Format the 3 numbers in a column closest to ZERO

Ultimate Selector

Board Regular
Ok so here is what I'm trying to do. Here are my numbers ..
I want to highlight the three lowse numbers closest to zero. Which would be numbers
0.1 , -.08 and 0.9 ...
I have tried several formulas but nothing has worked.
Any suggestions or the right conditional format formula would be greatly Appreciated!

Thanks in Advance!


<colgroup><col style="mso-width-source:userset;mso-width-alt:1512;width:33pt" width="43"> </colgroup><tbody>


MrExcel MVP, Moderator
Like this?

Excel Workbook
CF Near Zero
Conditional Formatting
A21. / Formula is =ABS(A2)<=AGGREGATE(15,4,ABS(A$2:A$10),3)Abc

Ultimate Selector

Board Regular
Booo Yaaa!!! Thanks sooo much Pete! This was exactly what I needed. I have been searchin for this forever!

U Da Man! Have a spectacular Morning!

U.S. :cool:


MrExcel MVP, Moderator
Cheers, glad it was what you wanted. Thanks for letting us know. :)

I think this would also have done as your CF formula:

Ultimate Selector

Board Regular
Hey Pete ...

It works fine if yur in a static mode and don't delete any columns. So if I start with 10 and don't delete any it's ok on both formulas.
However when I delete columns say 3 of the 10 then it does NOT work with either formula.
I need it to be dynamic as this is what my work entails.

Any ideas would be great. We are Very close to getting this done!

Thanks so much Pete!


MrExcel MVP, Moderator
I don't understand what you are saying regarding multiple columns. Your original sample data in post #1 appears to be in a single column so that's what I worked with. If you have multiple columns then you will need to explain more about that.
What do you have and where is it?
What are you trying to highlight and where?

I need to be able to know what you have so I can mock up a sample sheet and test.

Ultimate Selector

Board Regular
It is a single column just as I posted. However, it can go up to and including 14 entries.
The one I posted has 10 entries. Now use the formula and then go delete a row or two say A2 and A9 in your example.
The highlighting will also go away when you do this. Try it out and see if you get that as well.
These entries can start out with 14 or even maybe just 10. The formula seems to always cover 14. But if you start out with less say 10 then my preset template will lose the highlighting on this formula!

Let me know what you come up with cuz I have tried everything.

Ultimate Selector

Board Regular
By the way Pete,

Jut wanted to let you know I am highlighting the closest thee to zero by using a different color for each by changing the last number in the formula from 3 then to 2 then 1 each as a new rule.
Last edited:

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...