+ Reply to Thread
Results 1 to 5 of 5

Shading Alternate Unhidden Rows in Excel

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    NC
    MS-Off Ver
    Excel 2010
    Posts
    34

    Shading Alternate Unhidden Rows in Excel

    I have a file that contains multiple rows of data. I built a macro that will then hide rows with a $0 balance. When the macro is completed, my spreadsheet is only showing the lines with a $ amount. (The $0 rows are hidden)

    What I'd like to do is then format the unhidden rows so that each alternate row is color coded. This will help separate the rows visually so I can more easily follow the rows across to view $'s per line.

    I've attached a sample spreadsheet (it does contain the macro to hide the $0 rows). How can I then format the remaining rows with alternate shading?

    Thanks so much for your help!Alternate Shading Example.xlsm

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Shading Alternate Unhidden Rows in Excel

    Hi,

    Have you tried the 'Format As Table' functionality and then picking one of the pyjama stripe styles?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697

    Re: Shading Alternate Unhidden Rows in Excel

    Assuming B14:B32 will always be fully populated then select the whole range of your table B14:Q32 and use this formula in conditional formatting

    =MOD(SUBTOTAL(103,$B$14:$B14),2)

    That will format alternate visible rows

    Make sure the $ signs are exactly as shown
    Audere est facere

  4. #4
    Registered User
    Join Date
    04-24-2012
    Location
    NC
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Shading Alternate Unhidden Rows in Excel

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Have you tried the 'Format As Table' functionality and then picking one of the pyjama stripe styles?
    I hadn't even thought of that. I don't have the formatting down perfectly yet, but it seemed to work just fine based on one of the "canned" table styles.

  5. #5
    Registered User
    Join Date
    04-24-2012
    Location
    NC
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Shading Alternate Unhidden Rows in Excel

    Quote Originally Posted by daddylonglegs View Post
    Assuming B14:B32 will always be fully populated then select the whole range of your table B14:Q32 and use this formula in conditional formatting

    =MOD(SUBTOTAL(103,$B$14:$B14),2)

    That will format alternate visible rows

    Make sure the $ signs are exactly as shown
    This worked perfectly. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Alternate Shading Without Printing Blank Rows
    By Hazarrd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 05:31 PM
  2. Alternate shading of range of rows when when sell value changes
    By libinxu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2012, 05:36 PM
  3. Alternate Shading (fill color) every three rows
    By jeaux11 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-08-2008, 04:42 AM
  4. Replies: 2
    Last Post: 05-11-2007, 06:11 PM
  5. Replies: 8
    Last Post: 05-10-2006, 11:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1