View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Conditional Formatting using Formula

This does not require VB so long as we can develope one formula that returns
true or false based on the criteria being met.

We need to set up a table of your criteria... I created this in Cells D1:E12.
30 240
60 240
90 200
120 190
150 180
180 170
210 160
240 150
270 140
300 130
330 120
360 110


In Cell A10 add the following conditonal format
Format - Conditonal Format... Formulas is
=A10INDEX($E$2:$E$12,MATCH(A4-TODAY(),$D$1:$D$12,1))
Select your pattern to be Red
Select OK

--
HTH...

Jim Thomlinson


"FerrariWA" wrote:

Hello,

I am trying to create a formula within excel 2003 which will format a cell
depending on whether the criteria is met.
So for example, I want to use cell a4, that contains a date value to
calculate length in months using todays date then dependent on that outcome,
turn cell a10 red, if the length of months is 0-2 and value of cell a10 is
more than 240. if length is 3 months then turn red if more than 200 and if
length is greater than 3 months, turn red if more than 190 and so on..

Im thinking this requires some VB scripting to work?

There could be an easier way to do this.
Thanks,
WA