Conditional Formatting based on 2 criteria

  • Thread starter Still learning@work
  • Start date
S

Still learning@work

I am developing a retirement projection. I need to have the row highlighted
if the years of service is greater than 10 (cell D2) and age is greater than
55 (cell F2). How do I use conditional formatting to achieve this?
 
T

T. Valko

Let's assume the range to highlight is A2:F2

Select the range A2:F2
Goto the menu Format>Conditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=AND(COUNT($D2,$F2)=2,$D2>10,$F2>55)
Click the Format button
Select the desired style(s)
OK out
 
S

Still learning@work

Do I need to modify the formula any to have it work for the entire column?
What if D2 is the result of a calculation?
 
S

Sheeloo

Select the cells you want to highlight in row 2...

Use the formula
=AND($D2>10,$F2>55)

$ in front of the reference will force Excel to evaluate the same formula
for all cells in the row...

You can even paint it down for other rows... 2 will change to the row number
is is painted on...
 

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