views:

42

answers:

1

Good night.

I'm having some troubles to get what i need done.

I have some cells in a sheet that needs to be filled every day, manually.

I have also a dropdown with all the months, and another one with the days.

Is it possible to save data in specific cells for the selected dropdown values?

Something like for each day mantain different data in the same cells.

Thanks.

A: 

Hi Filipe,

I'm not exactly sure what you are requesting. What I think you are trying to do is:

  • Enter something into a cell
  • Select the Month and Day from the dropdown lists
  • Record the value of the dropdowns into cells near the value you entered.

Is this correct? If so, you would need to need to write a VBA macro that would take the values of the dropdown and write them into the cells where you needed them to be (presume next to your entered text). I think this would do that for you.

    Sub writeDropdowns()
        'This will take the values from cells B1 and C1
        'and record this in the two cells next to the selected cell
        Selection.Offset(0, 1).Value = ActiveSheet.Range("B1")
        Selection.Offset(0, 2).Value = ActiveSheet.Range("C1")
    End Sub

It assumes that the dropdown values are in cell B1 and C1 of the same sheet.You could then link this macro to a Form button. This is very simple and doesn't check for any errors, like if there is no cell selected. It should be a good starting point though.

Nicholosophy