+ Reply to Thread
Results 1 to 6 of 6

[SOLVED] Conditional formatting, alternate row colour to promote easy reading of long list

  1. #1
    Registered User
    Join Date
    09-22-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    [SOLVED] Conditional formatting, alternate row colour to promote easy reading of long list

    Hi there

    I have a long list of invoice lines. It is multiple columns. First two columns are Invoice # and Invoice line. Neither the invoice # nor the invoice line # is necessarily consecutive in the list. The list may look like:
    Invoice # Invoice Line # InvDate Qty etc etc
    12345 1 10/10/2010 1000
    12345 3 10/10/2010 46
    17010 2 17/10/2010 100
    10001 4 09/10/2010 9
    10001 5 09/10/2010
    10001 7 09/10/2010


    I would like to highlight the rows to promote easier reading/skimming, with alternate (say) blue and white on the entire row. In the above example this would mean the 2 lines for Invoice 12345 would be white, the single line for Inv 17010 would be blue, the three lines for Inv 10001 would be white etc etc. Banded highlighting, breaking on invoice #, alternating between two colours.

    Is this possible?

    TIA

    Ralph in Auckland
    Last edited by rmg08057; 10-04-2012 at 10:15 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Conditional formatting, alternate row colour to promote easy reading of long list

    use conditional formatting.

    high-light your entire range. when you open the CF window, select "use formula", and copy in this formula

    =OR($A2=$A3,$A2=$A1) - select blue as the format color. all alternate entries will be white/blue
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-22-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Conditional formatting, alternate row colour to promote easy reading of long list

    Thanks... this kinda worked, but produced inconsistent results, about 80% it got it right, but then for some it would highlight a set of rows that had different numbers... strange. Any thoughts? I have attached an example of it not working.Example conditional formatting.xlsx
    Last edited by Cutter; 09-23-2012 at 08:29 AM. Reason: Removed whole post quote

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Conditional formatting, alternate row colour to promote easy reading of long list

    ok i see where it went wrong. try this instead...i added a helper column in T and copied this formula down...
    =MOD(IF($A2=$A1,$T1,$T1+1),2)=1

    then i used this formula in CF...
    =$T2

  5. #5
    Registered User
    Join Date
    09-22-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Conditional formatting, alternate row colour to promote easy reading of long list

    Brilliant, works perfectly. This opens a world of possibilities, using TRUE/FALSE conditions. Hey, I am away.

    Sorry not to reply sooner, been head down on project, too busy working on pages of invoice lines to make it easier for me to look at pages of invoice lines.

    Spent 10 years in Philly, never went past your place unfortunately, mostly heading east/west in the turnpike south of you.

    Ralph

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Conditional formatting, alternate row colour to promote easy reading of long list [SOL

    glad to help, and thanks for the star

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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