Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
every fifth line
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to convert a dotted line to a solid line in a line graph | Charts and Charting in Excel | |||
Make a line in a bar chart, and change color of any bars that exceed the line | Excel Discussion (Misc queries) | |||
coloring overy other line without doing so line by line | Excel Worksheet Functions | |||
Macro problem on, Yellowed line - previous line or next line. | Excel Programming | |||
Reads entire *.txt file into string opposed to a desired line by line input. | Excel Programming |