i to = column in Formula
How do I get i to show in the formula as column 1, then 2 then 3 etc. for the five drop downs in A to E? Once the i is inside the formula " "'s it is just a plain letter i.
Sub FiveDD()
Dim i As Long
Range("A1").Select
For i = 1 To 5
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=OFFSET($A$2,0,0,COUNTA($A$2:$A$200),1) "
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
ActiveCell.Offset(0, 1).Select
End With
Next
End Sub
Thanks.
Howard
|