highlighting only the odd or even numbered rows?
Thanks.
highlighting only the odd or even numbered rows?
Thanks.
Something like this should do:
Sub banding()
ActiveSheet.Range("A65536").Select
Selection.End(xlUp).Select
lastrow = ActiveCell.Row
Range("A6:AK" & lastrow).Select
Selection.Interior.ColorIndex = xlNone
'Change rownum to the the first row number where data occurs
rownum = 6
For i = 1 To (lastrow - rownum) Step 2
Range("B" & rownum + i & ":AK" & rownum + i).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Next i
End Sub
Try highlighting the entire sheet, and using conditional formatting,
make Canodition1 be "Formula Is" =EVEN(ROW(A1))=ROW(A1), and set the
formatting to highlight the background.
You can do this using Conditional Formatting.
Select a range of rows.
Format>CF>Formula is:
For colored even rows enter =MOD(ROW()+1,2)=1
For colored odd rows enter =MOD(ROW(),2)=1
Gord Dibben Excel MVP
On Wed, 28 Sep 2005 07:39:44 -0400, "pezoids" <[email protected]> wrote:
>highlighting only the odd or even numbered rows?
>
>
>
>Thanks.
>
Great. Thanks for the replies!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks