Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code help for item tracking.
Hello,
I'm asking for vba code (or resources on the web) that will help with the following: When a date is entered in cell a1, I would like excel to calculate if that date was 120 days ago from TODAY(). If it wasn't, leave the cell format alone. If it was, change the background color (to notify me the item is overdue) until a date is entered in b1. When a date is entered in b1, remove background color from a1 (to notify me that the item has been checked-in). Thanks for any help, Russ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code help for item tracking.
I don't think you need VBA for this. Conditional Formatting should take care
of it. Check it out in Help. Select A1, then Format/Conditional Formatting, Format Is =IF(AND(B1="",TODAY()-A1120)) Then select the format you want for overdue items. On 23 Mar 2005 17:57:24 -0800, wrote: Hello, I'm asking for vba code (or resources on the web) that will help with the following: When a date is entered in cell a1, I would like excel to calculate if that date was 120 days ago from TODAY(). If it wasn't, leave the cell format alone. If it was, change the background color (to notify me the item is overdue) until a date is entered in b1. When a date is entered in b1, remove background color from a1 (to notify me that the item has been checked-in). Thanks for any help, Russ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code help for item tracking.
Myrna Larson wrote
=IF(AND(B1="",TODAY()-A1120)) Results in 'Your formula contains an error' i.e. needs something between last 2 )) -- David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code help for item tracking.
Just use the AND function
AND(B1="",TODAY()-A1120) Mike F "David" wrote in message ... Myrna Larson wrote =IF(AND(B1="",TODAY()-A1120)) Results in 'Your formula contains an error' i.e. needs something between last 2 )) -- David |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code help for item tracking.
Thanks for all of the responses! I'm wondering if anyone is seeing the
same thing I am: When I apply that formula to a blank cell, the cell changes to the formatting I selected without me entering a date. Is there a default date value in each cell that is evaluated in the formula that would cause this change? The formula works beautifully if there is a date already in the cell. Many thanks again, Russ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
enter item code in one column, automatically get description in ne | Excel Worksheet Functions | |||
How to insert tracking numbers into my webpage for RMA tracking | Excel Discussion (Misc queries) | |||
How to I put a comma in between each column item from this code | Excel Programming | |||
Selecting Menu Item by VBA Code | Excel Programming | |||
Select an item in a listbox using code | Excel Programming |