+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting - If three cells are equal

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Conditional Formatting - If three cells are equal

    Hello,

    I have been designing a spreadsheet to produce the lowest prices of two companies on multiple items. I have been able to conditionally format cell J2 to tell me which of the two companies are cheapest. [The formula in J2 is =IF(ISBLANK(F2),"",(IF(F2<H2,F2,H2)) ]. I have used the formula to conditionally format the cell based on their value based with [=J2=F2] then format orange. Then a separate formula for [=J2=H2] then format blue.

    The problem I am having is if all three are the same. This is possible as the items can be a set price so it does not matter which supplier the item comes from. I have tried using an if formula but this is has not worked, the formula I used was [J2=H2=F2].

    Is there a way to format the cell to give either of these three options?

    Many thanks,

    PER11

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,917

    Re: Conditional Formatting - If three cells are equal

    Please attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Conditional Formatting - If three cells are equal

    Try this:

    =(AND(J2=H2,H2=F2))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    01-25-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Conditional Formatting - If three cells are equal

    Many thanks Glenn. The "And" formula worked.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Conditional Formatting - If three cells are equal

    Glad to have helped.

  6. #6
    Registered User
    Join Date
    08-20-2016
    Location
    Drosopila
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional Formatting - If three cells are equal

    Easiest way, make conditional formatting to cell value equal to =min(cells)

    Remember to use $ in cell address, so the formula correctly copies to adjacent cells.

    [img]PLLS3dG.jpg[/img]

  7. #7
    Registered User
    Join Date
    01-25-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Conditional Formatting - If three cells are equal

    @Glenn if you needed to add an extra column, say L2, would would the formula be =(AND(L2=J2,J2=H2,H2=F2)) . I have tried and I cannot get it to work.

  8. #8
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Conditional Formatting - If three cells are equal

    I would go with the Average in this case... The average of any quantity in which all parts are equal is one part. Therefore an average of all parts should be equal to your choice of which part for comparison... I will compare F since it is the first in your array.

    Please Login or Register  to view this content.
    This means that you can continue to add any cell to the Average() and it will become TRUE if all contained within are equal!

    Do Note - That your effected range should include all parts you wish to highlight when TRUE or just a Resulting location when true. Probably best to keep it to once cell (Column) so that as you scale the formula you do not need to scale the range effected as the effected range will likely become lost in your setup.
    -If you think you are done, Start over - ELeGault

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Conditional Formatting - If three cells are equal

    ELeGault, will your formula work with 2,1,2,3 as the values in F, H, J & L?

    Per11. Works fine for me??!!
    Attached Files Attached Files

+ 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 - EQUAL
    By Mirkela357 in forum Excel General
    Replies: 10
    Last Post: 09-21-2015, 10:18 AM
  2. Replies: 5
    Last Post: 06-25-2015, 12:05 PM
  3. [SOLVED] Conditional Formatting Formula - Chang color of cells is other cell is equal to..
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 09-29-2013, 11:00 PM
  4. [SOLVED] Conditional formatting if equal or greater than average in the range of cells
    By Abu Abdurakhim in forum Excel General
    Replies: 7
    Last Post: 05-28-2013, 10:01 AM
  5. Conditional Formatting - not equal to
    By lordtopcat in forum Excel General
    Replies: 1
    Last Post: 08-09-2011, 11:34 PM
  6. Conditional formatting - nothing does not equal zero
    By username132 in forum Excel General
    Replies: 4
    Last Post: 03-10-2008, 05:37 AM
  7. DOES NOT EQUAL - Conditional Formatting
    By SamuelT in forum Excel General
    Replies: 5
    Last Post: 02-09-2006, 10:09 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