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
















4 Responses to “How windy is Wellington? – Using Power Query to gather wind data from web”
Breaking - Wind jokes at Chandoo
Kiwis sniffing for clues about blog post reason
It's confirmed: Wellington is windier than Uranus.
Acompanhando e aguardando ansiosamente a segunda parte.
[]s.
[Google translate]: Accompanying and eagerly awaiting the second part
hi chandoo,
i've tried using power query, however i face a rather weird problem. when i click on 'from web' option, the URL window does not show option for basic and advanced. thus i'm unable to form parameters in URL. how i can resolve this issue?