+ Reply to Thread
Results 1 to 13 of 13

Conditional formating formula

  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Conditional formating formula

    I would like to have a cell's fill color change if the following conditions are met (I will use cell D1 as the cell to fill):

    if cell B1 (which has a date as its value) = today's date AND cell F1 = BO

    My problem was using an if/and function that looks at B1 to see if it is today's date but cant figure that out. Any help would be appreciated.
    Last edited by jacko311; 02-02-2010 at 12:04 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Conditional formating formula

    In conditional formatting you do not need to use the IF statement. Use this formula
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formating formula

    Try

    =AND($B1=Today(),$F1="BO")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formating formula

    =and(b1=today(),f1="bo")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formating formula

    triple snap i claim the kitty

  6. #6
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Thumbs up Re: Conditional formating formula

    thanks everyone, that worked perfectly!!!!!!!!!!!!!!!!!!!

  7. #7
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Conditional formating formula

    Sorry, can i ask one more question. I want to copy this conditional formatting to an entire column but the formula does not update for each cell. I use copy paste special and select format but it's weird, only the first cell below the original cell has the correct formula but the rest of the cells have the second formula. What am i doing wrong?

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formating formula

    Does the formatting actually work? When you look at the formula in XL2007, it might only show the formula as you wrote it for the first cell. You have to look at the "Applies To" range... and see that it actually is applied to the range you want.

  9. #9
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Conditional formating formula

    no the formatting does not work in the cells other than the original.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formating formula

    Are you in Manual Calculation perhaps?

    Go to the Office Button and then Excel Options...Select Formulas on the left and then make sure Automatic is selected in the top section on the Right.

    If still no go.. can you post workbook sample showing problem?

  11. #11
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Conditional formating formula

    Formatting is set to automatic. Here is the spreadsheet. I am using the cell C2 as the cell i want to format and the one i copy from down the C column.
    Attached Files Attached Files

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formating formula

    Should you be looking at Column G for the "BO" existance

    so that formula should be:

    =AND($B3=Today(),$G3="BO")

    The conditional formatting in all the cells below C3 are applying to the range C3:C200

  13. #13
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Conditional formating formula

    Yikes! Lol. sorry. your help is really appreciated.

+ 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