Conditional Formatting

S

sojuman

I have a sheet that needs to compare AGE to LIFE EXPECTANCY. It also needs
to highlight the entire row when the age is greater than the life expectancy.


Thanks
 
M

Mike H

Hi,

This assumes age in col D expectancy in Col E. Select the rows to format and
then

Format|Conditional format
Formula is
=$D2>$E2

Pick a colour
Change 2 to the top row of the range.

Mike
 
S

Sandy Mann

With the age in Column J and Life Expectancy in Column K, highlight all your
data & use the Conditional Formatting formula:

=$J2>$K2

and set your format pattern colour.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

sojuman

Thanks Mike, works great.

Mike H said:
Hi,

This assumes age in col D expectancy in Col E. Select the rows to format and
then

Format|Conditional format
Formula is
=$D2>$E2

Pick a colour
Change 2 to the top row of the range.

Mike
 
S

sojuman

Thank you. How about if I wanted to show which ones were within 1-3 years of
reaching their life?
 
S

Sandy Mann

Assuming that you mean highlight for the three years leading up to the Life
Expectancy but not to highlight after then try:

=AND($J2>=$K2-3,$J2<=$K2)

If you mean to highlight from three years before and aslo aftewards try:

=$J2>=$K2-3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top