+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting - multiple criteria

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Kolkata
    MS-Off Ver
    Excel 2003
    Posts
    3

    Conditional formatting - multiple criteria

    Hi,

    Need some help. I am trying to format text using conditional formatting. This is what I want to do:
    If column H = "Implemented" and Column F < 90, change color to Yellow.

    Using the formula
    =AND(INDIRECT("H"&ROW())="Implemented",INDIRECT("F"&ROW())<90)
    which is not working.

    Any help is appreciated.

    Regards,
    Bobbie

    Tracking.xlsx

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting - multiple criteria

    Try this.

    =AND($F5<90,$H5="implemented")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    04-02-2013
    Location
    Kolkata
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional formatting - multiple criteria

    Wow, thanks. That was quick and it works great. Just for my understanding, what does $F5 represent here ? The range of cells between F5 and F10,000 (or whatever the upper limit is?

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

    Re: Conditional formatting - multiple criteria

    hi bobbie_ch, welcome to the forum. i would definitely go with Fotis' method, but i'm extremely curious what went wrong with your formula. i normally avoid using INDIRECT because it's a volatile formula (and not necessary to use in this case). the thing is, it should work still. if i separate the logic like this, it works well individually.
    =INDIRECT("F"&ROW())<90
    =INDIRECT("H"&ROW())="Implemented"

    but somehow, it just wouldnt work when combined in Conditional formatting. seems like it doesnt work well with AND with ROW(). if you could, please do not mark the thread as "Solved" for 1 or 2 days. just for my curiosity's sake.
    thanks

    Wow, thanks. That was quick and it works great. Just for my understanding, what does $F5 represent here ? The range of cells between F5 and F10,000 (or whatever the upper limit is?
    the Conditional Formatting only allows a single formula for a wide range. so try placing Fotis' formula in T5 & copy down. that's what it does internally. and that's why it's important to select from F5 downwards. if you select F100 to F5, it's as though you are placing the formula in T100 & copy up. HUGE difference. the dollar signs do not matter in this case since you are applying only to a single column. an eg is this formula that you apply across columns:
    =INDIRECT("H"&ROW())="Implemented"

    it can be:
    =$H5="Implemented"

    so try it again in T5. if you copy to the right, it will still be comparing column H. if you remove the dollar, it will be comparing if I5 is "Implemented"
    Last edited by benishiryo; 04-02-2013 at 08:49 AM.

    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

  5. #5
    Registered User
    Join Date
    04-02-2013
    Location
    Kolkata
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional formatting - multiple criteria

    Thanks again for your help. Marking it as solved.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional formatting - multiple criteria

    I don't know exactly why it doesn't work but I think it's linked to the fact that ROW() function returns an array, even if only a single value, e.g. it returns {5} rather than 5. Some functions seem to have problems processing that array.

    A workaround would be to put some other function around ROW to convert to a number, e.g. MAX or SUM like this

    =AND(INDIRECT("H"&SUM(ROW()))="Implemented",INDIRECT("F"&SUM(ROW()))<90)

    That version should work in conditional formatting (although I wouldn't recommend it as there are better solutions like the one suggested by Fotis)
    Audere est facere

+ 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