I have the following code below but I can not seem to get the syntax correct with it. I am wanting the program to check when cells A1:A5 is empty. If the range is not empty then take the one cells to the right using the "offset(0,1)" and put a dropdown list titled "Categories" in it. Below is what I have this far.
Code:
Sub Add_Drop_Down_Menu_Cell()
Dim Cell As Range
Dim Rng As Range
Set Rng = Sheets("Sheet1").Range("A1:A5").Validation
For Each Cell In Rng
If Cell.Value <> Empty Then
Cell.Offset(0, 1).Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, _
*Formula1:="=Categories"*
.IgnoreBlank = True
.InCellDropdown = True
If Answer = vbCancel Then Exit Sub
End If
Next Cell
End Sub
Bookmarks