Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
enter item code in one column, automatically get description in ne Shelley Kingston Excel Worksheet Functions 2 July 19th 06 12:32 PM
How to insert tracking numbers into my webpage for RMA tracking wiglady Excel Discussion (Misc queries) 0 April 4th 06 12:44 PM
How to I put a comma in between each column item from this code Adam Excel Programming 1 March 8th 05 08:40 AM
Selecting Menu Item by VBA Code PosseJohn Excel Programming 2 December 5th 04 12:24 PM
Select an item in a listbox using code Fred Jacobowitz Excel Programming 2 August 23rd 04 03:27 AM


All times are GMT +1. The time now is 01:22 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"