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.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try...

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

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!
 
Upvote 0
Wouldn't it be if col B were in ascending order?
 
Last edited:
Upvote 0
That worked awesome. Hope this is not a misleading post, if it is, I am sorry. But I have names that correspond to the values calculated in the formula above.

I have the following formula but it stops short. Is there a way to do the same thing with the following formula, without eliminating the list name only once even if it is listed on the Man Hours sheet more than once for the same date (multiple jobs in one day).

My numerical values are in column I.

For Instance:


I tried using 'Man Hours'!$B$5:$B$1698=I18 but it only populates the first three. I think the Frequency function is interfering with the match.

The formula is as follows:

=IFERROR(IF(ROWS($J$18:J18)>$H$8,"",INDEX('Man Hours'!$G$5:$G$1698,SMALL(IF(FREQUENCY(IF(('Man Hours'!$A$5:$A$1698=$G$4+0)*('Man Hours'!$E$5:$E$1698="LV")*('Man Hours'!$C$5:$C$1698<>"LV")*('Man Hours'!$B$5:$B$1698=I18),MATCH('Man Hours'!$G$5:$G$1698,'Man Hours'!$G$5:$G$1698,0)),ROW('Man Hours'!$A$5:$A$1698)-ROW('Man Hours'!$A$5)+1),ROW('Man Hours'!$A$5:$A$1698)-ROW('Man Hours'!$A$5)+1),ROWS($J$18:J18)))),"")

Col I Col J

316101</SPAN>Jordan Mackenzie C Wellwood</SPAN>
322001</SPAN>Jorge A Plazola Sepulveda</SPAN>
322001</SPAN>Servando Chavez Gallardo</SPAN>
322001</SPAN>There should be a name here
326001</SPAN>There should be a name here
326001</SPAN>There should be a name here
326001</SPAN>There should be a name here

<TBODY>
</TBODY><COLGROUP><COL><COL></COLGROUP>
 
Upvote 0


J18, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF($I18="","",INDEX('Man Hours'!$G$5:$G$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),IF('Man Hours'!$B$5:$B$1698=$I18,
  ROW('Man Hours'!$G$5:$G$1698)-ROW('Man Hours'!$G$5)+1)),COUNTIF($I$18:I18,I18))))
 
Last edited by a moderator:
Upvote 0
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</pre>
 
Upvote 0

Forum statistics

Threads
1,213,561
Messages
6,114,316
Members
448,564
Latest member
ED38

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