+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting based on another cell

  1. #1
    Registered User
    Join Date
    09-10-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    29

    Conditional Formatting based on another cell

    I have a simple CF to achieve but don't know how to achieve this.

    I have a spreadsheet with times in it. Some times are in bold and some in italic. Whate determines whether it is bold or italic is the value of a separate cell e.g.


    The font style in Cell B34 will depend upon the value in Cell B4. How do I set up the CF in Cell B34 to refelect this as Cell B34 has a formula in it not exclusively related to Cell B4?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Conditional Formatting based on another cell

    That B34 is or is not related to B4 is not important. It is the CF that does the job of comparing values or evaluating the conditions. Perhaps post a small sample sheet explaining what you need to achieve?

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,602

    Re: Conditional Formatting based on another cell

    Pl see the attached file.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-10-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Conditional Formatting based on another cell

    In the attached file all values in cells A13:C27 are formulas, which themselves have a reference to all of the values in row 2 via a Hlook up table based on permutations.

    What I want to achieve is for example C23 being bold (which it is but only because I have manually made it so) and the bold font in C23 being relevant to the value of cell C2. So if C2=GKS then Cell 23 is bold but if C2 was GKF then it would be italic.

    Thanks
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,602

    Re: Conditional Formatting based on another cell

    Pl see file
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-10-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Conditional Formatting based on another cell

    Ok you have answered something that I completely misunderstood and that is that the first cell in the CF dialogue box refers to cell value and formula. I always thought this meant the formula in the cell you are trying to format not the CF formula you need to CF that cell! Doh!

    OK thanks for that.

  7. #7
    Registered User
    Join Date
    09-10-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Conditional Formatting based on another cell

    What is the formula if there are multiple conditions e.g. C2="ABC" or "DEF" etc? I know how to write it if it was an IF formula but not sure in the Conditional Formatting dialogue box.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Conditional Formatting based on another cell

    Something like =OR(A1="text1",a1="text2"). The first IF is always implied in CF. Also note that CF always assumes you are using array formulas, so you don't have to bother eventually with the curly brackets

  9. #9
    Registered User
    Join Date
    09-10-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Conditional Formatting based on another cell

    Thanks Pepe.

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Conditional Formatting based on another cell

    Most welcome

+ 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. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  2. Conditional formatting based on % in other cell
    By D-smoke in forum Excel General
    Replies: 6
    Last Post: 02-15-2013, 07:47 AM
  3. Replies: 4
    Last Post: 01-06-2012, 05:07 PM
  4. Replies: 2
    Last Post: 10-24-2011, 12:41 PM
  5. Replies: 12
    Last Post: 02-18-2010, 06:23 AM

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