Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default conditional formatting w/ check for beginning odd or even

Final Macro:

Sub BlueRows()
With Selection
.FormatConditions.Delete
If Selection.Cells(1, 1).Row Mod 2 = 0 Then
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(ROW(),2)0"
Else
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(ROW(),2)=0"
End If
.FormatConditions(1).Interior.ColorIndex = 34
.Interior.ColorIndex = 2
End With
End Sub

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
Conditional Formatting on cells beginning with a hyphen Greg Lovern Excel Discussion (Misc queries) 3 November 16th 09 02:49 PM
Conditional Formatting to Check for Blanks Daren Excel Worksheet Functions 5 October 15th 08 11:14 PM
how to check for ANY text when conditional formatting? Heather Excel Discussion (Misc queries) 4 September 19th 07 08:10 PM
Check box & conditional formatting Brent Excel Discussion (Misc queries) 4 January 10th 06 05:43 AM
Check Boxes and Conditional Formatting Steve[_71_] Excel Programming 2 November 29th 04 07:30 PM


All times are GMT +1. The time now is 07:56 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"