Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shading alternate rows (XP)

    How do I get alternating rows to shade - like the old grey bar paper? I can do it manually, but when I sort my spreadsheet, the shading sorts too. I know I saw this somewhere, but here I sit at work with no reference materaials. Thanks!

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Shading alternate rows (XP)

    See the last post in <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=xl&Number=27808&page=&view= &sb=&o=&vc=1>this</A> thread. Notice that you can do it manually. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shading alternate rows (XP)

    Melanie,

    Try this which uses conditional formatting to shade even numbered rows of the current selection. You shade uneven rows by changing (ROW(),2) to (ROW(),1). Also select you favoured color index. 35 is a pastel green.<pre>Sub AlternateLineShade()
    Selection.FormatConditions.Delete
    Selection.FormatConditions.Add Type:=xlExpression, _
    Formula1:="=MOD(ROW(),2)=0"
    Selection.FormatConditions(1).Interior.ColorIndex = 35
    End Sub</pre>

    This code falls down of course if there are hidden rows, unless they are hidden in pairs.

    Andrew C

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shading alternate rows (XP)

    Thanks Andrew. I thought XP had made this easier. I want to share this with some fairly new users. Oh well. Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •