Condition Formating

julhs

Board Regular
Joined
Dec 3, 2018
Messages
80
Office Version
  1. 2010
Platform
  1. Windows
E15 can contain either “mph” or “Kmh” (as text)

Range E16:R119 contains formula and the results are dependent on the value in E15

So when E15 = “mph”, E16:R119 will contain one set of numbers and when E15 = “kmh” it will have another set

What I am trying to do is;

When E15 = “mph”, highlight cells in E16:R119 that are between 2.5 – 4.75 in one colour

But when E15 = “kmh” highlight cells in E16:R119 that are between 4.00 – 7.00 in different colour

Problem I’m trying to resolve is the range between 4.00 – 4.75 which is common to both sets of results

The obvious solution is to reference the contents of E15, and then apply the appropriate formatting conditions to E16:R119, however Condition Formatting does not like things I’ve tried

Is there a solution to this with Condition Formatting, which is what I’d like to do? Or just use VBA to do it?
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,517
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=AND($E$15="mph",E16>=2.5,E16<=4.75)
 
Solution

julhs

Board Regular
Joined
Dec 3, 2018
Messages
80
Office Version
  1. 2010
Platform
  1. Windows
How about
Excel Formula:
=AND($E$15="mph",E16>=2.5,E16<=4.75)
Thank you Fluff, perfect.
Spent TO long trying to get this.
Many thanks.
Julhs
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,517
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

julhs

Board Regular
Joined
Dec 3, 2018
Messages
80
Office Version
  1. 2010
Platform
  1. Windows
Thank you Fluff, perfect.
Spent TO long trying to get this.
Many thanks.
Julhs
Where I seen to be have been going wrong was using the range E16:R119 and not the first cell in the range?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,517
Office Version
  1. 365
Platform
  1. Windows
Yes, you should always look at the 1st cell in the applies to range.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,505
Messages
5,625,199
Members
416,080
Latest member
blemon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top