Cheryl asks via e-mail,
I was wondering if you could help me figure out how to combine the round formula with the rank formula? I need to first round all the numbers and then rank them. I have tried various ways to do this but they aren’t working properly. I really don’t want to add a column to round and then rank because I need to do this round/rank many times for this particular spreadsheet. There are also merged columns which makes it even more challenging. Before I go through the painstaking efforts to insert columns to round, I thought I’d check with you.

Of course, just as any other excel formula problem, we can solve this with … strong coffee.
Well, I am kidding, but coffee along with array formulas seems to help.
How to write an excel array formula to round and sort a list?
Assuming the data is in range C3:C12, and B3:B12 has running numbers from 1 to 10, the below array formula,
=SMALL(ROUNDDOWN(C3:C12,0),B3:B12)
when entered in the range D3:D12 will round and sort the range of values in C3:C12.
Remember, first you should select the entire range D3:D12 and then type the formula (in first cell) and press ctrl + shift + enter to make it an array formula.
Update: Even better alternatives from commenters
Here are few interesting alternatives, thanks to our commeneters.
- =SMALL(ROUNDDOWN($B$1:$B$9,0),ROW(B1)), array enter in cell C1 and drag in the entire range. Thanks to Chrisham.
- Instead of using ROW() as Chrisham did above, we can also use ROWS() function. This will let you add rows on top without having to change formulas. Elias recommends using this formula: =SMALL(INDEX(INT($C$3:$C$12),0),ROWS($D$3:D3)). Thank you.
- Since we are only sorting numbers, it shouldn’t matter whether we sort and round or round and sort, as Jeff pointed. So, we can use the normal formula =ROUNDDOWN(SMALL($B$3:$B$12,ROWS(B$3:B3)),0) in cell C3 and copy in the entire range. Thanks Jeff
More resources: Learn excel array formulas | Online Help on Excel Formulas














6 Responses to “Using Lookup Formulas with Excel Tables [Video]”
H1 !
this is my very first comment.
Can you use same technique with Excel 2003 lists ?
thanks 😀
Thanks, Chandoo! I like seeing the sneak peak of what's to come on Friday too 🙂
@Damian.. Welcome to chandoo.org. Thanks for the comments.
Yes, you can use the same with Excel 2003 lists too.
@Tom.. You have seen future and its awesome.. isnt it?
[…] Using Tables – Video 1, Video 2 […]
[…] Using Tables – Video 1, Video 2 […]
Hi, is there a vlookup formula for the second example (IDlist)? I used a similar formula to look up the ID for the person, but the reverse way (look up the person with the ID) comes up N/A.