Consulting

Results 1 to 6 of 6

Thread: Solved: Conditional Formatting Help excel 2003

  1. #1
    VBAX Regular
    Joined
    May 2012
    Posts
    64
    Location

    Solved: Conditional Formatting Help excel 2003

    Good morning/Evening,
    I have a little blank spot...

    I am trying to figure out this formula but right now it's not working.

    I need when it's 7 days from the delivery date to turn bleu and after the delivery date to turn red.

    this is what I have:

    Cond. #1: =(O5-TODAY())<7
    Cond. #2 =(O5-TODAY())<14

    One: Is this correct?

    How do i make this in a VB code in Column O (From O5 to O1000)

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    One: Did it work the way you want it to when you tried it?
    Two: Why use VBA when Excel's Conditional Formatting is easier and more robust?

  3. #3
    VBAX Regular
    Joined
    May 2012
    Posts
    64
    Location
    One: No it turns bleu even after the date has passed. and Red one month before the date.

    Example: I have a delivery date on July 19, 2012 and the info is in Red. we are only May 18, 2012 therefore should be in black.


    Two: VB because the user will not be able to change any information from the Excel Sheet. Plus I will be the admin of this workbook therefore I will be able to see the errors if the user complains

  4. #4
    VBAX Regular
    Joined
    May 2012
    Posts
    64
    Location
    But I guess I could keep it in Conditional formatting cause they would have to go in the format menu...

    So yes I can keep it as Conditional Formatting and not VB Code.

    Column O has all the same C.F. but none of them is working.

    I have one that was delivered on Feb. 26, 2012 and not red.
    I have one that will be delivered on May 23, 2012 and not bleu.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    If you put the red condition first, if it is > 14 days old it will pass, bit so will the blue condition, and the second will take preference unless you tell the CF to stop on true.

    Best to put the blue condition first, red second.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Regular
    Joined
    May 2012
    Posts
    64
    Location
    Cond. #1 =(O5-TODAY())>7 (Blue)
    Cond. #2 =(O5-TODAY())<7 (Red)

    My god to many days in VB coding can make you go insane lol

    Thanks guys it's working now.

    I need a refresh course

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •