+ Reply to Thread
Results 1 to 7 of 7

Conditional formatting of a cell with the matching value if another cell is not blank

  1. #1
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Austin, TX - USA
    MS-Off Ver
    Microsoft 365
    Posts
    114

    Conditional formatting of a cell with the matching value if another cell is not blank

    I currently have a block of cells with dynamic values and then I have another single cell with a static value. I created a rule that formats only cells in the block of cells of those that contain cell value of the single cell with the static value. Now I want to add another single cell, a value of which will trigger the aforementioned formatting rule. Basically, if this new cell is not blank, then execute the formatting of cells in the block that match the value of the cell that has the static value. In the attached example, the trigger cell is O5 and it should turn formatting on or off with any value. The blueish fill of the cell D5 is a result of the conditional formatting because it matches the value of K5.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-19-2016
    Location
    Pakistan
    MS-Off Ver
    2007
    Posts
    2

    Re: Conditional formatting of a cell with the matching value if another cell is not blank

    You have to apply two rules here as per following order to meet your criteria for this CF;


    Ist Order Rule = Formula Rule (applied to cell range C5:G5);

    =ISBLANK($O$5)

    Format= No Fill

    Check the BOX "STOP IF True"



    2nd Order Rule = Format only Cells that Contain (applied to cell range C5:G5);

    Cell Value = equals to =$K$5

    Format = Blue



    Remember: Apply both Rules in the order mentioned above, otherwise it will not work.

  3. #3
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Austin, TX - USA
    MS-Off Ver
    Microsoft 365
    Posts
    114

    Re: Conditional formatting of a cell with the matching value if another cell is not blank

    Thank you very much, seekerarcane! Simple solution and makes sense. Although the solution works, but unfortunately it will not work for me: I probably should have mentioned that my actual project consists of multiple and much bigger blocks of cells and also multiple cells that can apply formatting to the same block of cells. Therefore, the solution should only target that specific formatting rule and not the whole block of cells.

  4. #4
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Austin, TX - USA
    MS-Off Ver
    Microsoft 365
    Posts
    114

    Re: Conditional formatting of a cell with the matching value if another cell is not blank

    Any other idea? Anyone?

  5. #5
    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 of a cell with the matching value if another cell is not blank

    Combine your original CF formula with a check of the 'trigger' cell. To do this, you need to select the 'Use a formula to determine which cells to format' option. In your example file, this CF rule will do what you want:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Logic: if O5 is not blank AND C5 equals K5, then do the formatting; because C5 is relative (no $) then this will apply to the whole block selected (in this case C5:G5).

    Does that help?
    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.

  6. #6
    Forum Contributor
    Join Date
    10-15-2009
    Location
    Austin, TX - USA
    MS-Off Ver
    Microsoft 365
    Posts
    114

    Re: Conditional formatting of a cell with the matching value if another cell is not blank

    Aardigspook, that was exactly what I was looking for! Thank you very much!

  7. #7
    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 of a cell with the matching value if another cell is not blank

    You're welcome, thanks for the feedback and the rep.

+ 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. [SOLVED] Use Conditional Formatting on a Cell Based on matching a value in a range
    By fablhof in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2015, 09:28 PM
  2. Replies: 8
    Last Post: 05-07-2014, 04:57 AM
  3. [SOLVED] Conditional Formatting a blank cell based on another cell's date
    By krista_o in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2014, 04:13 PM
  4. [SOLVED] Conditional Formatting if cell value is not blank
    By t.regi in forum Excel General
    Replies: 4
    Last Post: 01-07-2014, 03:06 AM
  5. [SOLVED] Conditional formatting-if cell is blank it says BLANK
    By KK1234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2013, 04:27 AM
  6. Replies: 1
    Last Post: 02-16-2012, 02:26 AM
  7. Replies: 4
    Last Post: 07-18-2007, 05:39 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