+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting of rows depending on the value of adjacent cells

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    Seattle, Washington
    MS-Off Ver
    Current
    Posts
    6

    Conditional formatting of rows depending on the value of adjacent cells

    I would like to format the entire row based on what is in Column A.

    In column A, I have the days of the week, in order, with sometimes repeating values. See below:

    A1 Sunday
    A2 Monday
    A3 Tuesday
    A4 Wednesday
    A5 Thursday
    A6 Friday
    A7 Saturday
    A8 Sunday
    A9 Monday
    A10 Monday
    A11 Monday
    A12 Tuesday
    A13 Wednesday
    A14 Thursday
    A15 Thursday
    A16 Friday

    What I want to do is format the row with Monday, but if there are multiple Mondays in a row, only the last instance. So in the example above, the formatting would only be applied to row 2 and row 11.

    The formula I used to use was this, but when there are multiple Mondays in a row it doesn't help me.
    =INDIRECT("A"&ROW())="Monday"

    So I am stuck. Please help, thanks!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Conditional formatting of rows depending on the value of adjacent cells

    hi there. do not highlight the entire row. that will take up memory. select the range you want to apply to (say from A1:E20)
    in Excel 2007 & above, go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    =LOOKUP(2,1/($A$1:$A$16="Monday"),ROW($A$1:$A$16))=ROW()
    Last edited by benishiryo; 06-19-2013 at 09:53 PM. Reason: highlight some words

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    07-18-2012
    Location
    Seattle, Washington
    MS-Off Ver
    Current
    Posts
    6

    Re: Conditional formatting of rows depending on the value of adjacent cells

    benishiryo, thanks for the help but unfortunately that formula did not work.

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Conditional formatting of rows depending on the value of adjacent cells

    sorry about that. after reading your description again, it ought to be:
    =AND($A1="Monday",$A2<>"Monday")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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