+ Reply to Thread
Results 1 to 5 of 5

New macro

  1. #1
    Registered User
    Join Date
    03-15-2006
    Posts
    2

    New macro

    I'm trying to create a new macro so that I can calculate dates and the results show up as a cell being a solid color. Heres the info I'm working with. I have a future date, I need to compare it to todays date. When there are 14+ days its green, 2-13 days yellow, 0-1 red, a - number is black. Any help would be greatly appreciated. I'm just learning all this.

  2. #2
    Carim
    Guest

    Re: New macro

    Hi Kujo,

    You don't need a macro ...
    Try Format Conditional Formatting
    Under Condition Select Formulais ,
    and for example =B2>today()
    then select format according to your choices...

    HTH
    Cheers
    Carim


  3. #3
    Registered User
    Join Date
    03-15-2006
    Posts
    2
    Thanks for the reply, I'm still a but confused. do I actually type today in or the date. whats in the ()? will this cover the 14 days out or 7 days out? Sorry I totally am new as you see!

  4. #4
    Carim
    Guest

    Re: New macro

    Kujo,

    In a cell of your choice, type in the date you want to test ....

    Then Go to Menu Format Conditional Formatting
    and play around with the sample formula to understand how it works ...

    Only then you can move on and refine your formula according to your
    needs ..

    HTH
    Carim


  5. #5
    Doug Glancy
    Guest

    Re: New macro

    Kujo21,

    Highlight all the cells you want to format, then, as Carim said, use
    Conditional Formatting - Format > Conditional Formatting.
    In the leftmost dropdown box, stick with the default, "Cell Value Is."
    In the second box, choose "greater than."
    In the third type "=TODAY() + 14" without the quotes. Today() is the Excel
    function that returns today's date.
    Click the Format button, then the patterns tab, then choose your color.

    You'll actually need a different conditional formatting for each different
    length. You can have up to 3. The conditions are evaluated from 1 to 3, and
    once a condition is met, the next ones aren't evaluated. So your first
    condition should check for 14 days, 2nd for 2 days, etc.

    One more thing. I often find that I do all of the above, and my formatting
    doesn't work. I go back into CF and see that it's put quotes around my
    formula in the 3rd box. If I wasn't so lazy, I'd figure out why, but when I
    remove the quotes, the CF works.

    hth,

    Doug

    "Kujo21" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm trying to create a new macro so that I can calculate dates and the
    > results show up as a cell being a solid color. Heres the info I'm
    > working with. I have a future date, I need to compare it to todays
    > date. When there are 14+ days its green, 2-13 days yellow, 0-1 red, a
    > - number is black. Any help would be greatly appreciated. I'm just
    > learning all this.
    >
    >
    > --
    > Kujo21
    > ------------------------------------------------------------------------
    > Kujo21's Profile:
    > http://www.excelforum.com/member.php...o&userid=32484
    > View this thread: http://www.excelforum.com/showthread...hreadid=522693
    >




+ 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