Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

copy data validation using VBA

I have a macro which creates a Data Validation in cell R11.

I need to copy this down in every cell where the row is not blank. The number of rows changes every day.

can someone provide VBA code that will copy this down

thanks
Avatar of Michael
Michael
Flag of Belgium image

Hi Jagwarman,

can you post the code of this macro you're referring to?
And which column can be used as a reference for checking what the last row is (which column always has a value in the last row)?

Thanks
Joop
Avatar of Jagwarman
Jagwarman

ASKER

I have created a 'category' which is on Sheet3 which is then hidden.

Sub Category()
'
' Category Macro
'

'
   
    Sheets("Today").Select
    Range("R11").Select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=Category"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With
   
         
End Sub
Ok, and how about:

which column can be used as a reference for checking what the last row is (which column always has a value in the last row)?
sorry missed that question.

Column 'A'
ASKER CERTIFIED SOLUTION
Avatar of Michael
Michael
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks