View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
umba-sr
 
Posts: n/a
Default Conditional formatting

Hi,

Let me give you an actual example.

I have a column E with dates of births. In the other column, I have a
formula that calculates age of every employee basing on his date of birth.
Formula is as follows:

=DATEDIF(E4,TODAY(),"Y")&" years, " & DATEDIF(E4,TODAY(),"ym")&" months, " &
DATEDIF(E4,TODAY(),"md")&" days"

E4 value is 27-May-1972, therefore result will display '33 years, 9 months,
14 days'

Now, when I mark the whole column, I use conditional formatting to display
age differently. Greater than 35 should color the cell yellow, less or equal
to 35 should fill blue. But it doesn't, it only fills cells with yellow.

How can I make it recognize age as presented above?

Thanks