Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |