Highlighting the first and second lowest value excluding any zero entries

BigKeyes13K

New Member
Joined
Feb 11, 2023
Messages
8
Office Version
  1. 365
Platform
  1. MacOS
I am attempting to highlight the lowest and second lowest value, separately, in a field of data, ignoring any entries of zero. The lowest value would be highlighted green, the second lowest value would be highlighted yellow so the formulas must be separate for each, and I am looking to highlight only that number. I am rather novice at this and I have been trying to piece together formulas from these forum groups, adding dollar signs however those work, just stabbing blindly until it works. My current attempt to accomplish this is as follows:

Screen Shot 2023-02-11 at 5.26.34 PM.png
Screen Shot 2023-02-11 at 5.26.11 PM.png


This has given me the following result.

Screen Shot 2023-02-11 at 5.26.54 PM.png


The red is from a separate rule affecting the row so that's fine. It has identified the correct number for lowest and second lowest, but it is highlighting every number lower, not just that number and only that number. The green rule was given a higher priority just so it would show up at all. As I type it now occurs to me that I could create a higher priority rule to have no fill for any number that is zero, but I do kind of want to know the correct way to write this.

Thank You.
 
You need TRUE for that argument. Although you are sorting a row, you are doing so by the relevant column values.
Because you have changed direction, you also need to change the $ signs from the row values to the column values.
It seems that you are now trying for the highest 2 values. If that is the case then there is no need to filter off the blanks/zero values.

See if this does what you want.

23 05 18.xlsm
MNOPQRSTUVWXYZAAABACAD
17202291293315228322700
180.10.110.330.130.380
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M18:AD18Expression=M18=INDEX(SORT(UNIQUE($M18:$AD18),,-1,TRUE),2)textNO
M18:AD18Expression=M18=INDEX(SORT(UNIQUE($M18:$AD18),,-1,TRUE),1)textNO
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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