BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
I am running the following code to create data validation drop downs.
Now that this code is working, I need to apply the code to every 4th cell on sheet 1, starting with D12. Then moving to D11, D16, D20, and so on.
Can someone help? Code is appreciated.
Code:
Sub DropDownCode()
Dim Choices As String
Choices = "Choice 1, Choice 2, Choice 3"
Sheets("Sheet1").Range("D12").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Choices
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
Now that this code is working, I need to apply the code to every 4th cell on sheet 1, starting with D12. Then moving to D11, D16, D20, and so on.
Can someone help? Code is appreciated.