Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 151
Default How can I tell excel to highlight every 4 rows?

I need to highlight every 4 rows in my spreadsheet. How do I do this? I
have 21000 rows to sort through. :(
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How can I tell excel to highlight every 4 rows?

One way
Sub HI()
For I = 1 To 21000 Step 4
Rows(I).Interior.ColorIndex = 6
Next I
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amanda" wrote in message
...
I need to highlight every 4 rows in my spreadsheet. How do I do this? I
have 21000 rows to sort through. :(


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default How can I tell excel to highlight every 4 rows?

On May 23, 7:58*am, Amanda wrote:
I need to highlight every 4 rows in my spreadsheet. *How do I do this? *I
have 21000 rows to sort through. *:(


Can also be done using conditional formatting with...

Formula Is =MOD(INT((ROW(1:1)-1)/4),2)=0

which applies the chosen highlight colour to the 1st to 4th, 9th to
12th etc rows in the cells that were selected before the conditional
formatting was applied,OR...

Formula Is =MOD(INT((ROW(1:1)-1)/4),2)=1

which applies the chosen highlight colour to the 5th to 8th, 13th to
16th etc rows in the cells that were selected before the conditional
formatting was applied.

Ken Johnson

..

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
Highlight rows Scott R Excel Worksheet Functions 5 December 5th 07 01:19 AM
[VBA] How to highlight rows in PivotTable xpan Excel Worksheet Functions 0 September 26th 06 11:57 PM
Formatting to highlight rows Angie Excel Discussion (Misc queries) 1 August 15th 06 11:41 PM
Can I highlight all the odd rows in Excel? paulkc Excel Discussion (Misc queries) 1 November 21st 05 01:46 PM
Isolate rows based on highlight (Excel 2003) Alcide Excel Worksheet Functions 2 April 21st 05 05:40 PM


All times are GMT +1. The time now is 01:41 PM.

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"