Extract Acrobatics

RicardoCubed

Board Regular
Joined
Jul 10, 2013
Messages
206
Office Version
  1. 365
Platform
  1. Windows
Extract Acrobatics = Looking for a modification to extractformula that will order records in date ascending order AND then by dollaramount lowest to highest. So, recordswould in this case be in the following order by Person.
Person3
Person8
Person5
Person2
Person4

Can this be done formulaically? Help appreciated. Thanks in advance.


Book1
ABC
1extract acrobatics
2Database
3DOHNameSalary
401/01/18Person150,000
503/01/18Person245,000
602/01/18Person365,000
704/01/18Person435,000
802/15/18Person570,000
906/01/18Person630,000
1007/01/18Person780,000
1102/15/18Person860,000
1209/01/18Person990,000
1306/15/18Person1072,500
1411/01/18Person1183,900
1512/01/18Person1248,500
16
17Lower2/1/2018
18Upper4/1/2018
19Count5
20
21Extract
22DOHNameSalary
2303/01/18Person245,000
2402/01/18Person365,000
2504/01/18Person435,000
2602/15/18Person570,000
2702/15/18Person860,000
28---
Sheet1
Cell Formulas
RangeFormula
B19=COUNTIFS($A$4:$A$15,">="&$B$17,$A$4:$A$15,"<="&B18)
B23=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D23))),"-")
B24=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D24))),"-")
B25=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D25))),"-")
B26=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D26))),"-")
B27=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D27))),"-")
B28=IFERROR(INDEX(B$4:B$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(D$23:D28))),"-")
A23=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C23))),"-")
A24=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C24))),"-")
A25=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C25))),"-")
A26=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C26))),"-")
A27=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C27))),"-")
A28=IFERROR(INDEX(A$4:A$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(C$23:C28))),"-")
C23=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E23))),"-")
C24=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E24))),"-")
C25=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E25))),"-")
C26=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E26))),"-")
C27=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E27))),"-")
C28=IFERROR(INDEX(C$4:C$15,AGGREGATE(15,6,(ROW($A$4:$A$15)-ROW($A$4)+1)/(($A$4:$A$15<=$B$18)*($A$4:$A$15>=$B$17)),ROWS(E$23:E28))),"-")



 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
[TABLE="width: 245"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]DOH[/TD]
[TD]Name[/TD]
[TD]Salary[/TD]
[/TR]
[TR]
[TD="align: right"]15/06/2018[/TD]
[TD]Person10[/TD]
[TD="align: right"]72,500[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018[/TD]
[TD]Person8[/TD]
[TD="align: right"]60,000[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018[/TD]
[TD]Person5[/TD]
[TD="align: right"]70,000[/TD]
[/TR]
[TR]
[TD="align: right"]12/01/2018[/TD]
[TD]Person12[/TD]
[TD="align: right"]48,500[/TD]
[/TR]
[TR]
[TD="align: right"]11/01/2018[/TD]
[TD]Person11[/TD]
[TD="align: right"]83,900[/TD]
[/TR]
[TR]
[TD="align: right"]09/01/2018[/TD]
[TD]Person9[/TD]
[TD="align: right"]90,000[/TD]
[/TR]
[TR]
[TD="align: right"]07/01/2018[/TD]
[TD]Person7[/TD]
[TD="align: right"]80,000[/TD]
[/TR]
[TR]
[TD="align: right"]06/01/2018[/TD]
[TD]Person6[/TD]
[TD="align: right"]30,000[/TD]
[/TR]
[TR]
[TD="align: right"]04/01/2018[/TD]
[TD]Person4[/TD]
[TD="align: right"]35,000[/TD]
[/TR]
[TR]
[TD="align: right"]03/01/2018[/TD]
[TD]Person2[/TD]
[TD="align: right"]45,000[/TD]
[/TR]
[TR]
[TD="align: right"]02/01/2018[/TD]
[TD]Person3[/TD]
[TD="align: right"]65,000[/TD]
[/TR]
[TR]
[TD="align: right"]01/01/2018[/TD]
[TD]Person1[/TD]
[TD="align: right"]50,000

this would be order for date descending and salary ascending[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Oldbrewer. Thanks for looking at - but not what I was asking/looking for.
Was wondering if the formula (s) that extract the data based on the date range criteria could be modified so that in the dataset it pulls first based on date ASCENDING and then orders by dollar amount.
Perhaps not a clear posting. Regards
 
Upvote 0
[TABLE="width: 245"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]DOH[/TD]
[TD]Name[/TD]
[TD]Salary[/TD]
[/TR]
[TR]
[TD="align: right"]01/01/2018[/TD]
[TD]Person1[/TD]
[TD="align: right"]50,000[/TD]
[/TR]
[TR]
[TD="align: right"]02/01/2018[/TD]
[TD]Person3[/TD]
[TD="align: right"]65,000[/TD]
[/TR]
[TR]
[TD="align: right"]03/01/2018[/TD]
[TD]Person2[/TD]
[TD="align: right"]45,000[/TD]
[/TR]
[TR]
[TD="align: right"]04/01/2018[/TD]
[TD]Person4[/TD]
[TD="align: right"]35,000[/TD]
[/TR]
[TR]
[TD="align: right"]06/01/2018[/TD]
[TD]Person6[/TD]
[TD="align: right"]30,000[/TD]
[/TR]
[TR]
[TD="align: right"]07/01/2018[/TD]
[TD]Person7[/TD]
[TD="align: right"]80,000[/TD]
[/TR]
[TR]
[TD="align: right"]09/01/2018[/TD]
[TD]Person9[/TD]
[TD="align: right"]90,000[/TD]
[/TR]
[TR]
[TD="align: right"]11/01/2018[/TD]
[TD]Person11[/TD]
[TD="align: right"]83,900[/TD]
[/TR]
[TR]
[TD="align: right"]12/01/2018[/TD]
[TD]Person12[/TD]
[TD="align: right"]48,500[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018[/TD]
[TD]Person8[/TD]
[TD="align: right"]60,000[/TD]
[/TR]
[TR]
[TD="align: right"]15/02/2018[/TD]
[TD]Person5[/TD]
[TD="align: right"]70,000[/TD]
[/TR]
[TR]
[TD="align: right"]15/06/2018[/TD]
[TD]Person10[/TD]
[TD="align: right"]72,500[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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