+ Reply to Thread
Results 1 to 5 of 5

Color fill rows based on dupe value

  1. #1
    Registered User
    Join Date
    04-23-2009
    Location
    columbia, Missouri
    MS-Off Ver
    Excel 2003
    Posts
    2

    Color fill rows based on dupe value

    I need to color fill rows in a spreadsheet based on account number so I can easily distinguish them. for example, my data might be like:

    acct # 1
    acct # 1
    acct # 1
    acct # 2
    acct # 2
    acct # 3
    acct # 3

    I would want rows w/ acct # 1 to be colored differently than acct # 2, but 1 and 3 could be the same color, as long as it could change dynamically.

    If anyone could help, it would make my life much easier.

    Thanks,

    Jay

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Color fill rows based on dupe value

    See if this page will help?

    Colour Banding
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-23-2009
    Location
    columbia, Missouri
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Color fill rows based on dupe value

    Close, but not quite.

    This would work if the number of rows with dupe acct numbers were equal, but in my case, there could be 1 account number, or 10 duplicates.

    Esssentially it would need to somehow look at the account number, compare it to the surrounding cells, and fill it with the same color as the cell above it (if the account number is equal) or fill it with a different color (if not equal).

    Thanks for the help,

    Jay

  4. #4
    Forum Contributor
    Join Date
    10-30-2007
    Location
    Norway
    MS-Off Ver
    MS Office 2007
    Posts
    345

    Re: Color fill rows based on dupe value

    I would use a helper column that indexes the groups of accounts. This index increases by one for each new account.
    I then use conditional formatting to check if this index number is odd or even and make a different color for the even numbered indexes.

    You can hide the helper column

    Se attachment
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Color fill rows based on dupe value

    I quoted wrong site... check this site: Colour Banding in Groups

    Look for heading: "Color Grouping with alternating colors (#grouping)"
    .
    .
    .
    .

+ 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