Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Automatically Highlight every 22nd row

I have a sheet of over 750 rows of data and need to pick out every
22nd row for an audit. Is there a way to get Excel to highlight every
22nd row in steed of manually counting every 22 row and highlighting

Thanks,
Paul
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Automatically Highlight every 22nd row

Paul,

The following macro will highlight every 22nd row up to row 770.

Sub Highlight()
For i = 1 To 35
ActiveWorkbook.ActiveSheet.Rows(i * 22).Select
With Selection.Interior
.ColorIndex = 44
.Pattern = xlSolid
End With
Next
End Sub

If you need to cover more than 770 lines, increase the 35 in the second line
to a higher number.

If you need to highlight every 22nd row, but starting in row 23 (ie, if you
have a 1st row with headings), change the 3rd line of the code to:

ActiveWorkbook.ActiveSheet.Rows(i * 22 + 1).Select


"Paul" wrote:

I have a sheet of over 750 rows of data and need to pick out every
22nd row for an audit. Is there a way to get Excel to highlight every
22nd row in steed of manually counting every 22 row and highlighting

Thanks,
Paul

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Automatically Highlight every 22nd row

Hi,

Select your 750 rows then

Format|conditional format|Formula is
enter the formula
=MOD(ROW( ),22)=0
Pick a colour
Click OK

Mike

"Paul" wrote:

I have a sheet of over 750 rows of data and need to pick out every
22nd row for an audit. Is there a way to get Excel to highlight every
22nd row in steed of manually counting every 22 row and highlighting

Thanks,
Paul

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 automatically a specific cell Frances Holden[_2_] Excel Worksheet Functions 1 January 7th 08 03:05 PM
Automating data extraction on 22nd of month Sarah (OGI) Excel Worksheet Functions 1 May 23rd 07 03:24 AM
Have spreadsheet changes automatically highlight Tim Miser Excel Worksheet Functions 2 March 7th 06 09:20 PM
Format numbers (ie 1st, 2nd, 3rd, 4th, 22nd, etc) Graham S Excel Discussion (Misc queries) 1 January 6th 06 04:49 PM
Highlight automatically anything that is other than required Adnan Excel Worksheet Functions 5 March 14th 05 03:27 AM


All times are GMT +1. The time now is 05:19 PM.

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

About Us

"It's about Microsoft Excel"