+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting based on Text match from If Statement?

  1. #1
    Registered User
    Join Date
    11-05-2004
    Location
    Palm Springs California
    MS-Off Ver
    Office 2011 for Mac
    Posts
    37

    Conditional Formatting based on Text match from If Statement?

    I want to highlight a cell if the text displayed from an IF formula is equal to the cell content.

    CELLS BK10:BN10 are merged and have entered into them the following text "SELL"

    Cells BJ20:BP20 are merged and contain the following formula which currently results in the cell displaying "SELL"

    =IF(BM22<=-0.08,"SELL", IF(AND(BM22>-0.08,BM22 < -0.03),"NO INDICATION", IF(BM22>=-0.03,"HOLD")))

    Cell BM22 is a percentage calculation of the differences between two different days of volume for this stock and that formula is: =(BH22/BH25)-1 Cell BM22 currently is calculating the result to be -65.65%

    When I set up a CLASSIC Conditional Formatting using a formula (="If($BJ$20=""SELL""") to check the if the text in cells BK10 match the text displayed in cell BJ20 - I get no error messages and no formatting?

    I am using Mac Office Excel 2011. I feel like I have tried everything including changing the Number selection type of the cells to TEXT. Nothing seems to works. Thanks, grateful for the assistance, Michael

  2. #2
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Conditional Formatting based on Text match from If Statement?

    MJSlattery, Good afternoon.

    a) You can change your formula.

    Before:
    =IF(BM22<=-0.08,"SELL",IF(AND(BM22>-0.08,BM22<-0.03),"NO INDICATION",IF(BM22>=-0.03,"HOLD")))

    Now:
    =IF(BM22<=-0.08,"SELL",IF(AND(BM22>-0.08,BM22<-0.03),"NO INDICATION","HOLD"))


    b) Conditional Formatting at BK10

    Simple verify if BJ20 is EQUAL BK10

    1st condition --> Cell value is --> EQUAL TO --> BJ20


    Please, try this one and tell us if it worked for you.
    I hope it helps you.

    Greetings from Brazil.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,256

    Re: Conditional Formatting based on Text match from If Statement?

    You can even change the formula to:

    =IF(BM22<=-0.08,"SELL",IF(BM22<-0.03,"NO INDICATION","HOLD"))

    Conditional format don't need a 'IF' formula.
    The answer is for a conditional format formula is always a 'TRUE' or 'FALSE':

    =$BJ$20="SELL"
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

+ 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. Replies: 1
    Last Post: 10-02-2013, 02:36 PM
  2. [SOLVED] Conditional formatting based on VLOOKUP/INDEX:MATCH
    By strud in forum Excel General
    Replies: 2
    Last Post: 06-13-2013, 07:02 AM
  3. [SOLVED] Conditional formatting based on VLOOKUP & HLOOKUP or MATCH
    By Joss.Terrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-27-2012, 11:43 PM
  4. Conditional Formatting based on Text
    By avidcat in forum Excel General
    Replies: 3
    Last Post: 12-31-2010, 07:11 AM
  5. [SOLVED] Conditional formatting based on if statement.
    By kevin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2005, 12:06 AM

Tags for this Thread

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