Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chris Marlow
 
Posts: n/a
Default Conditional formatting

Hi,

For you column containing your age set you conditional formatting to use
'Formula Is' and refer to your DOB column (E) - something like
'=DATEDIF(E1,TODAY(),"Y")35'.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"umba-sr" wrote:

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

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
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 11:35 PM.

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"