Solved

From three numbers, highlight the lowest number if it is lower than the middle number by more than 5% of the middle number

Posted on 2015-01-22
119 Views
Hello
Other than using a rather involved series of if statements is there a formula I can use to conditionally highlight the lowest number of three numbers if it is lower than the number with the middle value by more than 20% of the number with the middle value and also conditionally highlight the highest number if is higher than the number with the middle value by more than 20% of the number with the middle value?
For example in the attached sample file, 5 would be highlighted in the first set of numbers (13 is the middle number) and both 10 and 35 would be highlighted in the second set of numbers (25 is the middle number).
C--Users-Dave-OneDrive-Documents-sample.
0
Question by:Dave
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 50

Accepted Solution

barry houdini earned 500 total points
ID: 40565585
What sort of document is that, I can't open it? It's probably easier to attach an excel workbook if you can but try this assuming three numbers in A2:C2

Select the whole range of numbers and apply this formula in conditional formatting for your first condition

=AND(A2=MIN(\$A2:\$C2),A2<SMALL(\$A2:\$C2,2)*80%)

and similarly for condition 2

=AND(A2=MAX(\$A2:\$C2),A2>SMALL(\$A2:\$C2,2)*120%)

format as required

I attach an example

regards, barry
cf-barry.xlsx
0

LVL 81

Expert Comment

ID: 40565651
NO POINTS
Sample.xlsx
0

Author Closing Comment

ID: 40565741
Thanks!
This works great.
I had opened excel 2013 and thought I had saved it as the default excel workbook.
0

LVL 50

Expert Comment

ID: 40567604
No problem,

Thanks Dave and David!

regards, barry
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Suggested Courses
Course of the Month6 days, 3 hours left to enroll