#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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.


--
Kujo21
------------------------------------------------------------------------
Kujo21's Profile: http://www.excelforum.com/member.php...o&userid=32484
View this thread: http://www.excelforum.com/showthread...hreadid=522693

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default New macro

Hi Kujo,

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

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default New macro


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!


--
Kujo21
------------------------------------------------------------------------
Kujo21's Profile: http://www.excelforum.com/member.php...o&userid=32484
View this thread: http://www.excelforum.com/showthread...hreadid=522693

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default 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" wrote in
message ...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"