Index Small results sorted in numerical ascending order

sacastiglia

New Member
Joined
Jul 29, 2014
Messages
23
Hello All,

I am trying to figure out how to sort the results of this formula in ascending numerical order.


=IFERROR(INDEX('Man Hours'!$B$5:$B$1698,SMALL(IF(('Man Hours'!$D$5:$D$1698=316001)*('Man Hours'!$B$5:$B$1698<>316001)*('Man Hours'!$A$5:$A$1698=$G$4),ROW('Man Hours'!$A$5:$A$1698)-ROW('Man Hours'!$A$5)+1),ROWS($I$18:I18))),"")

As always, any assistance is greatly appreciated.
 
Learning opportunity: I am figuring the COUNTIF($I$18:I18,I18) part of this formula is what puts the values in order. How does this do that

That tackles with the tied values. When we have say 2 instances of 90, the IF in SMALL will deliver two corresponding row numbers. COUNTIF will say 1 for the first instance of 90, allowing SMALL to pick out first row number and feed that to INDEX. When COUNTIF says 2, SMALL will pick out the second row number corresponding to the second instance of 90 and feeding that to INDEX, completing the 90 case.

Hope this helps.
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,214,983
Messages
6,122,595
Members
449,089
Latest member
Motoracer88

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