View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Conditional Formatting using Formula

Select A10. Under conditional formatting, first conditions, change first box
to "formula is:". Input this:
=OR(AND(DATEDIF($A$4,TODAY(),"m")<3,A10240),AND(D ATEDIF($A$4,TODAY(),"m")=3,A10200),AND(DATEDIF($A $4,TODAY(),"m")3,A10190))
Format with red pattern.

Note that this breaks down into 3 OR functions (rewritten for clarity):
=OR(
AND(DATEDIF($A$4,TODAY(),"m")<3,A10240),
AND(DATEDIF($A$4,TODAY(),"m")=3,A10200),
AND(DATEDIF($A$4,TODAY(),"m")3,A10190)
)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"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