+ Reply to Thread
Results 1 to 11 of 11

Formatting series of rows according to column value

Hybrid View

  1. #1
    Registered User
    Join Date
    08-22-2007
    Posts
    7

    Formatting series of rows according to column value

    Hi,

    I have a large datset that looks like this:

    ++++++++++++++++++++++++++++++++++
    + + A + B + C +
    ++++++++++++++++++++++++++++++++++
    +1+ ID + EventDate + EventType +
    +2+ 111 + 1/1/1995 + Visit +
    +3+ 111 + 1/30/1995 + Vaccine +
    +4+ 111 + 4/22/1998 + Visit +
    +5+ 222 + 7/7/2000 + Survey +
    +6+ 333 + 8/8/2001 + Labs +
    +7+ 333 + 8/22/07 + Pharmacy +
    +8+ 333 + 8/22/07 + Visit +

    I would like to shade the rows with alternating colors so that all the data pertaining to a given ID can be easily spotted. In the example above, I would need A2:C4 to be shaded one color, A5:C5 another color, and A6:C8 the first color again.

    How can this be done? I am using Excel 2007.

    Thanks much.

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

    http://www.mvps.org/dmcritchie/excel/condfmt.htm

    Look for the heading: Color Grouping with alternating colors (#grouping)
    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
    08-22-2007
    Posts
    7
    Thnks for the useful link.

    Sadly, I tried it, and I get the "helper column" right, but when I actually apply the CF (formula =$E1=1), nothing happens! Could it be that there is a slightly different approach in Excel 2007?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I don't have 2007, so I am not exactly sure...but I wouldn't imagine that it would be different.

    Make sure your referencing the right cell when applying the CF formula....it should reference the top-most cell in your selection (your helper column).

    If you save your file as an XL2003 and zip it and post it here, I can look at it and you can see if it will be the same again when you re-save it as 2007.

  5. #5
    Registered User
    Join Date
    08-22-2007
    Posts
    7
    Huh! So, I tried to save it as 2003, and I got a message that says "Significant loss of functionality. Some cells contain conditional formatting with the 'Stop if true' condition cleared. Earlier versions of Excel do not recognize this option and will stop after the first true condition".

    Does this mean somtehing to anybody? Anyway, will ignore it, save it as 2003, and ship it to the list momentarily.

  6. #6
    Registered User
    Join Date
    08-22-2007
    Posts
    7
    OK, here it is. Thank you for offering to take a look.
    Attached Files Attached Files

+ 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