+ Reply to Thread
Results 1 to 14 of 14

Condtional Formatting

  1. #1
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Smile Condtional Formatting

    Good morning!

    I am working on an Excel sheet to track customer status for storage units we have.

    I have successfully programmed condtionnal formatting for two options, but I am having difficulty with the third.

    What I have set up is If the date (in a certain cell in a different sheet) is greater than today, the group of cells selected are green. If the date is less than today, the group of selected cells are red.

    What I am trying to do, If there is no date, I want the group of selected cells to be Orange.

    Please Help!!!
    Last edited by univerco; 10-11-2011 at 04:46 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtionnal Formatting

    Maybe:

    =A1=""


    No idea what cells you are formatting so you'll need to translate

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtionnal Formatting

    That doesn't work. The problem I am having is that the cell I am pointing at (B13) hs a formula to get data from Sheet 2. When I put a date in sheet 2, cell B8, my condtionnal formatting works for both the red and the green. But when there is no date in sheet 2, B8, B13 is empty or has a zero, depending on the options I choose. I want the cell to be orange when there is no date entered in sheet 2, B8.

    Thanks in advance!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtionnal Formatting

    Post a sample workbook, please.

  5. #5
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    Here it is...it is in french though but you can respond with english formulas.

    thanks!
    Attached Files Attached Files

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtional Formatting

    Condition 1: Formula is: =$B$13=0 ... amber
    Condition 2: Formula is: =$B$13>TODAY() ... green
    Condition 3: Formula is: =$B$13<TODAY() ... red

    The reason is that if the cell is empty, the link will return 0, not blank.


    Regards

  7. #7
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    If my date cell is empty, it returns this date though: 0 janv. 1900
    How can it return a 0?

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtional Formatting

    Put 0 in a cell. Format the cell as Date. What do you see before you format it? What do you see after you format it? What you are seeing is a zero being returned from the link and your formatting presenting it as the date 00/01/1900.

    To return a space, you'd need something like, =IF(Sheet2!B13=0,"",Sheet2!B13)

    Regards

  9. #9
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    Still not returning a 0.

    This is the formula I used:

    =SI('1'!B8;'1'!B8;0)

    However, if I use VIDE instead of 0, it works. (VIDE means empty).

    I will try your solution with VIDE instead of 0.

  10. #10
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    So I tried your solution and the color stays green.

    Is there another solution?

  11. #11
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    Ok, so I got the cell orange by putting test (VIDE) in Sheet 2 B8, however, #VALUE shows up in sheet 1 B13.

    If there any way to hide that of is this the only way my selected cells will be orange?

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtional Formatting

    This:

    =SI('1'!B8;'1'!B8;0)

    is not the same as this:

    =IF(Sheet2!B13=0,"",Sheet2!B13) or =IF(Sheet2!B8=0,"",Sheet2!B8)

    even in French.

    You'd need something like this:

    =SI('1'!B8="";"";'1'!B8)

    This says, if the value in cell B8 on sheet 1 is blank (null), return null, otherwise return value in cell B8 on sheet 1.

    Have a look at the updated example for formula and Conditional Formatting examples.


    Regards
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    10-07-2011
    Location
    Québec
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Condtional Formatting

    Thank you so much for fixing my workbook! I have been looking for a solution for days...

    Thanks again so much

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,199

    Re: Condtional Formatting

    You're welcome. Thanks for the rep.

    Regards

+ 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