Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a dotted line to a solid line in a line graph Sharlz Charts and Charting in Excel 1 January 14th 09 04:51 AM
Make a line in a bar chart, and change color of any bars that exceed the line MarkM Excel Discussion (Misc queries) 4 July 5th 06 04:06 PM
coloring overy other line without doing so line by line gen Excel Worksheet Functions 5 April 1st 05 10:38 PM
Macro problem on, Yellowed line - previous line or next line. Ed Excel Programming 7 March 29th 05 09:37 PM
Reads entire *.txt file into string opposed to a desired line by line input. ej_user Excel Programming 3 October 11th 04 07:15 PM


All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"