+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting not working on cell that has formula

  1. #1
    Registered User
    Join Date
    09-24-2017
    Location
    Philippines
    MS-Off Ver
    2017
    Posts
    12

    Conditional Formatting not working on cell that has formula

    Good day,

    I'm seeking for immediate assistance with the conditional formatting in excel...

    What I'm trying to do is to put a conditional formatting on a cell that has formula. For example, the cell AH17 which is currently shaded in light blue that contains formula:
    =IF(COUNTIFS($AR$5:$AR$24,"<"&$AF17,$AS$5:$AS$24,">"&$AE17)=0,"",COUNTIFS($AR$5:$AR$24,"<"&$AF17,$AS$5:$AS$24,">"&$AE17)
    should turn to white if it is equal to or greater than the cell N17.

    Example: I have tried to use this formula (=AH17>=N17) in cell AH17 using the new rule in conditional formatting but it's automatically turns to white.

    Please note that the cells AH5 to AH52 is depending on the cells AR5 to AS 24...

    I have attached the file that I'm currently working for reference. Please advise. Thank you very much in advanced.
    Attached Files Attached Files
    Last edited by ely.rodriguez; 09-24-2017 at 02:33 PM.

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Conditional Formatting not working on cell that has formula

    Welcome to the forum.
    For cell AH17 only: 'Conditional Formatting' → 'New Rule' → 'Format only cells that contain'.
    In the Rule Description, choose 'Cell Value' 'greater than or equal to' and enter '=N17'.

    Assuming you actually want this to apply to the whole column, first select the range AH5:AH52, then do the C.F. with '=N5'

    Hope that helps.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    09-24-2017
    Location
    Philippines
    MS-Off Ver
    2017
    Posts
    12

    Re: Conditional Formatting not working on cell that has formula

    Good day Aardigspook,

    Thanks for the prompt response. I have already tried that, however, the cell AH17 automatically turns into white even if it doesn't have any values.

    What I would like to do is that the cell AH17 will turn to white if it has a value that is equal to or greater than the cell N17.

    Please advise. Thank you very much...

  4. #4
    Registered User
    Join Date
    09-19-2013
    Location
    NY, NY
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Conditional Formatting not working on cell that has formula

    Hi Ely,
    Maybe I'm missing something blatantly obvious (known to happen), but there is 1.00 in both AH17 and N17, therefore, being that they are equal, the conditional formatting complies and applies the rule, "IF AH17 is Greater than or Equal to N17 turn it white", turning the cell from blue to white. If I enter 2 in N17 or if I enter 0.5 in AH17, the cell remains blue. Unless I am missing something, are you sure you want it to be >= and not just >?

    As far as I can see and tested, both your formula and the CF rule given by Aardigspook do the same thing.

    Cheers.

  5. #5
    Registered User
    Join Date
    09-24-2017
    Location
    Philippines
    MS-Off Ver
    2017
    Posts
    12

    Re: Conditional Formatting not working on cell that has formula

    Hi Alphonse68,

    It should be >=...

    You can just remove the values that I entered in cells AR5 and AS5 to remove the value in AH17. As mentioned, the cell AH17 is depending on cells AR5 to AS24. So, if you will remove those values, and apply the CF formula given by Aardigspook on cell AH17, it will automatically turns into white.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Conditional Formatting not working on cell that has formula

    Currently you have two formulas applied to $AG$5:$AM$52
    1) =M5>=1, and
    2) =W5>=198

    Which should be:
    1) =$M5>=1, and
    2) =$W5>=198
    if you are intending to compare values only in columns M and W. Actually, they should be combined into one formula
    Please Login or Register  to view this content.
    I don't see why you need to WHITE FILL any cell, that should be the default (?). However, it would be:
    Please Login or Register  to view this content.
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    09-24-2017
    Location
    Philippines
    MS-Off Ver
    2017
    Posts
    12

    Re: Conditional Formatting not working on cell that has formula

    Hi ProtonLeah,

    Thanks for your suggestions. I have tried that, but I'm getting the same result.

    Let's try this one instead. If AH17 is greater than N17 and X17 is equal to or greater than 198, cells AR2 and AS2 should fill in red.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Conditional Formatting not working on cell that has formula

    I'm not sure about your logic for the CF formula. In AR5:AS5 , you have 10:00/10:30 AM which corresponds to row 17 in columns X and AH, but in OT Req's table, row 10:00 is in row 25 vs 17 (6:00 AM).

    Using INDEX and matching the weekday and start time:
    =AND(INDEX(Commitment,MATCH($AR5,CommitmentTime),MATCH(AR$3,CommitmentDay))>INDEX(OvertimeReqs,MATCH($AR5,OTTime),
    MATCH(AR$3,OvertimeDays)),INDEX(SeatingIntervals,MATCH($AR5,SeatingTime),MATCH(AR$3,SeatingDay))>=198).

    However the merged cells in AP3:BC3 had to be unmerged.
    Named Ranges defined:
    Commitment ='OT Commitment'!$AG$5:$AM$52
    CommitmentDay ='OT Commitment'!$AG$4:$AM$4
    CommitmentTime ='OT Commitment'!$AE$5:$AE$52
    OTTime ='OT Commitment'!$L$5:$L$52
    OvertimeDays ='OT Commitment'!$M$4:$S$4
    OvertimeReqs ='OT Commitment'!$M$5:$S$52
    SeatingDay ='OT Commitment'!$W$4:$AC$4
    SeatingIntervals ='OT Commitment'!$W$5:$AC$52
    SeatingTime ='OT Commitment'!$U$5:$U$52
    Attached Files Attached Files
    Last edited by protonLeah; 09-26-2017 at 03:09 PM.

  9. #9
    Registered User
    Join Date
    09-19-2013
    Location
    NY, NY
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Conditional Formatting not working on cell that has formula

    Hi Ely,

    About your dilemma on cell AH17, if I replace the "" with a zero in the countif formula you have in that cell, the conditional formatting works correctly. It's an Excel thing. You could hide the zero like you did in other columns or by formatting the cell(s) as "0.00;;".

    And about cells AR2 and AS2 which you want filled red, it will work with
    Please Login or Register  to view this content.
    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. =if(and(... formula in conditional formatting dialogue box not working...
    By ChrisCD in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-27-2016, 02:22 AM
  2. [SOLVED] Conditional Formatting Not Working With Formula
    By markd038 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-28-2014, 04:05 AM
  3. Conditional Formatting Formula Not Working Properly
    By Oscar Martin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2014, 08:59 AM
  4. AND in Conditional Formatting Formula not working
    By readyemail in forum Excel General
    Replies: 11
    Last Post: 11-30-2010, 06:00 PM
  5. using a formula in conditional formatting not working
    By missmischa in forum Excel General
    Replies: 4
    Last Post: 02-22-2010, 06:04 PM
  6. Conditional Formatting with LARGE formula not working
    By peri1224 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2010, 09:47 AM
  7. conditional formatting not working in every cell
    By mhutch71 in forum Excel General
    Replies: 3
    Last Post: 01-04-2006, 04:25 PM

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