View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default every fifth line

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