every fifth line
You can do the border part without VBA by using conditional
formatting.
Select the whole range, then Format/Conditional Formatting,
formula is =MOD(ROW(),5)=0 and format of heavy underline.
On 18 Jan, 16:06, Sam Wilson
wrote:
Sub demo()
Dim i As Integer
With Range("a1")
For i = 0 To 200
.Offset(i * 5, 10).Validation.Add Type:=xlValidateList,
AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=$D$1:$D$4"
.Offset(i * 5, 0).Resize(1, 11).Borders(xlEdgeTop).Weight = xlThin
Next i
End With
End Sub
"Jock" wrote:
Hi,
By vba, how can I
a) insert a bold black border along the top edge of every fifth row down to
about row 1000 ( and along the row to K)?
b) make every fifth cell in column K a dropdown list using data validation?
Thanks
--
Traa Dy Liooar
Jock
|