PC Review


Reply
Thread Tools Rate Thread

Changing cell colors to correspond to different dates

 
 
=?Utf-8?B?ZW10cDY3Mzg=?=
Guest
Posts: n/a
 
      25th Sep 2006
I am trying to create a spreadsheet to help with medication inventory. I want
to have the cell change colors at different intervals to correspond to
different dates to give me different warning levels. For example, if a
medication is to exipre within 30 days, I would like the cell to change to
yellow and when it becomes 7 days or less I would like it to change to red. I
have not been able to figure this out. Please help. Thank you.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      25th Sep 2006
Assuming the expiry dates (real dates) are running in B2 down,

Select the entire sheet (with A1 active),
then apply Conditional Formatting as follows ..

Click Format > Conditional Formatting

Under Condition 1, set it as:
Formula is:
=AND($B1<>"",$B1-TODAY()<=7)
Format: Red fill

For Condition 2 (click Add), set it as:
Formula is:
=AND($B1<>"",$B1-TODAY()>7,$B1-TODAY()<30)
Format: Yellow fill

Click to OK out

The above will color (fill) entire rows based on the expiry dates in col B:
lines with expiry dates within 8 - 30 days (yellow)
lines with expiry dates within 7 days or less (red)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"emtp6738" wrote:
> I am trying to create a spreadsheet to help with medication inventory. I want
> to have the cell change colors at different intervals to correspond to
> different dates to give me different warning levels. For example, if a
> medication is to expire within 30 days, I would like the cell to change to
> yellow and when it becomes 7 days or less I would like it to change to red. I
> have not been able to figure this out. Please help. Thank you.

 
Reply With Quote
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      26th Sep 2006
Here's just a quick working sample to complement:
http://cjoint.com/?jAdxHawM1r
CF_example_date conditions.xls
(with CF dialog screenshot)

Adapt to suit. The sample construct conditionally colors entire rows. If you
want to only conditionally color a single col, say the medication names in
col A, then just select col A (instead of the entire sheet), and apply the
same cond format formulas (no change).

If the CF doesn't work, probably the dates in col B are not real dates
recognized by Excel. Try selecting col B, click Data > Text to Columns. Click
Next > Next. In step 3 of the wizard, under Column data format, check "Date",
then select the format from the droplist next to it, eg: DMY, to suit. Click
Finish. This might suffice to convert it to real dates.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates changing colors JAS Microsoft Excel Worksheet Functions 2 30th Mar 2010 12:08 AM
Changing label colors according to dates =?Utf-8?B?QUxhdw==?= Microsoft Access VBA Modules 8 20th Jul 2007 12:00 AM
Cell colors or text color changing when date in cell gets closer. =?Utf-8?B?Q2hhc2U=?= Microsoft Excel Worksheet Functions 5 19th Oct 2006 08:57 AM
Changing Cell Colors Ed' Microsoft Excel Discussion 1 31st Aug 2004 01:44 AM
cell conditional format with dates/colors skylinekiller Microsoft Excel Misc 3 29th Apr 2004 11:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:13 PM.