+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Conditional Formatting using "IF" Function

  1. #1
    Registered User
    Join Date
    05-14-2010
    Location
    ontario
    MS-Off Ver
    Excel 2003
    Posts
    1

    Conditional Formatting using "IF" Function

    Hi everyone,

    I am trying to use the if function while conditional formatting and here is my issue:

    I want cells in column A to appear green when cell E1 contains "Back from BT" as well a date -- ex. Back from BT 29-MAR-2010

    I have the formatting set as =IF(A1="Back from BT",TRUE,FALSE).....I know this is wrong as I need to include a "Variable" for the date.

    It should say =IF(A1="Back from BT VARIABLE FOR DATE",TRUE,FALSE).

    This is because the Date will change.

    Anty suggestions? Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional Formatting using "IF" Function

    1) You don't need to use an IF and put in TRUE/FALSE as the results. CF formulas are by nature TRUE/FALSE tests. IF you simply leave off the IF() part, you can still get accurate answers.

    Try this, put this in an empty cell:

    =A1=B1

    If those two cells are equal, you'll get a TRUE answer, else FALSE. See?


    2) Try this, assuming the date you want to include is in D1:

    =A1="Back from BT " & TEXT(D1, "DD-MMM-YYYY")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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