Condition Formating

julhs

Active Member
Joined
Dec 3, 2018
Messages
407
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?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How about
Excel Formula:
=AND($E$15="mph",E16>=2.5,E16<=4.75)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
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?
 
Upvote 0
Yes, you should always look at the 1st cell in the applies to range.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,033
Members
448,940
Latest member
mdusw

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
Back
Top