Ranking Invoices By Highest Amount By "Year to Date"

ellison

Active Member
Joined
Aug 1, 2012
Messages
356
Office Version
  1. 365
Platform
  1. Windows
Hi, we are trying to rank our invoices by amount "Year & Year To Date" but have run into a headache!

We managed to rank them via Quarter & Year (as per Col G table below)... and we were also very helpfully given a great tip by "Fluff" which ranks the invoices - but without "skipping numbers"

ie. if two invoice amounts (which are the same) are in second highest position in the rankings, the next highest ranking to apply to an invoice amount would be 3 (not 4).

Please would it be possible to include the ranking done in that way (i.e. without skipping numbers for the rankings) for the YTD by Quarter figures (in Column I)?

Hopefully the table below will show a little bit better what we are trying to work towards:

Column-D: invoice quarter (i.e. "1" = months 1-3, "2" = months 4-6, "3" = months 7-9, "4" = months 9-12)

Column-F: Ranking Period-01: Invoice / Year

Column-G: Ranking (without skipping numbers) for the Year & Quarter [sorted using Fluff's very, very handy

Column-H: Ranking Period-02: Invoice / YTD by Qr

Column-I: Ranking (without skipping numbers) for the Year & YTD (by Quarter): done manually!


invoices-ranked-by-YTD-01-question.xlsx
ABCDEFGHI
1Invoice NumberInvoice AmtInvoice DateInvoice QuarterInvoice YearRanking Period-01: Year & QrPeriod-01 Invoice Rank (w/o skipping numbers) For Yr & QuarterRanking Period-01: Year & YTD by QuarterPeriod-02 Invoice Rank (w/o skipping numbers) For Yr & YTD (by Quarter)
271701,23513/02/2024120242024 / QR 112024 / Q11
3719280015/03/2024120242024 / QR 122024 / Q12
4800197513/07/2024320242024 / QR 312024 / Q1-Q2-Q32
5811260013/08/2024320242024 / QR 322024 / Q1-Q2-Q34
6824255015/10/2024420242024 / QR 432024 / Q1-Q2-Q3-Q47
789801,90028/11/2024420242024 / QR 422024 / Q1-Q2-Q3-Q42
888882,50020/11/2024420242024 / QR 412024 / Q1-Q2-Q3-Q41
927851,15031/10/2012420122012 / QR 412012 / Q1-Q2-Q3-Q41
10322275021/05/2013220132013 / QR 212013 / Q1-Q21
1149802,62519/03/2015120152015 / QR 132015 / Q13
1249552,80024/02/2015120152015 / QR 112015 / Q11
1349212,70005/01/2015120152015 / QR 122015 / Q12
1451402,60010/05/2015220152015 / QR 222015 / Q1-Q24
1551452,95024/06/2015220152015 / QR 212015 / Q1-Q21
Sheet1
Cell Formulas
RangeFormula
D2:D15D2=ROUNDUP(MONTH(C2)/3,0)
E2:E15E2=YEAR(C2)
F2:F15F2=CONCATENATE(E2," / QR ",D2)
G2:G15G2=XMATCH(B2,SORT(UNIQUE(FILTER($B$2:$B$20,$F$2:$F$20=F2)),,-1))
H2:H15H2=CONCATENATE(E2," / ",IF(D2=1,"Q1",IF(D2=2,"Q1-Q2",IF(D2=3,"Q1-Q2-Q3",IF(D2=4,"Q1-Q2-Q3-Q4","error")))))
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try this:

Book1
ABCDEFGHIJ
1Invoice NumberInvoice AmtInvoice DateInvoice QuarterInvoice YearRanking Period-01: Year & QrPeriod-01 Invoice Rank (w/o skipping numbers) For Yr & QuarterRanking Period-01: Year & YTD by QuarterPeriod-02 Invoice Rank (w/o skipping numbers) For Yr & YTD (by Quarter)
27170123513/2/2024120242024 / QR 112024 / Q111
3719280015/3/2024120242024 / QR 122024 / Q122
4800197513/7/2024320242024 / QR 312024 / Q1-Q2-Q322
5811260013/8/2024320242024 / QR 322024 / Q1-Q2-Q344
6824255015/10/2024420242024 / QR 432024 / Q1-Q2-Q3-Q477
78980190028/11/2024420242024 / QR 422024 / Q1-Q2-Q3-Q422
88888250020/11/2024420242024 / QR 412024 / Q1-Q2-Q3-Q411
92785115031/10/2012420122012 / QR 412012 / Q1-Q2-Q3-Q411
10322275021/5/2013220132013 / QR 212013 / Q1-Q211
114980262519/3/2015120152015 / QR 132015 / Q133
124955280024/2/2015120152015 / QR 112015 / Q111
13492127005/1/2015120152015 / QR 122015 / Q122
145140260010/5/2015220152015 / QR 222015 / Q1-Q245
155145295024/6/2015220152015 / QR 212015 / Q1-Q211
Sheet1
Cell Formulas
RangeFormula
D2:D15D2=ROUNDUP(MONTH(C2)/3,0)
E2:E15E2=YEAR(C2)
F2:F15F2=CONCATENATE(E2," / QR ",D2)
G2:G15G2=XMATCH(B2,SORT(UNIQUE(FILTER($B$2:$B$20,$F$2:$F$20=F2)),,-1))
H2:H15H2=CONCATENATE(E2," / ",IF(D2=1,"Q1",IF(D2=2,"Q1-Q2",IF(D2=3,"Q1-Q2-Q3",IF(D2=4,"Q1-Q2-Q3-Q4","error")))))
J2:J15J2=XMATCH(B2,SORT(UNIQUE(FILTER($B$2:$B$20,($E$2:$E$20=E2)*($D$2:$D$20<=D2))),,-1))
 
Upvote 0
Solution
That's absolutely amazing...... HUGE thanks!!! MArked upas the solution

(And apologies for throwing in my manual error on Row 14, that is exactly why I need to use these formulas to calculate these things o_O🥊
 
Upvote 0

Forum statistics

Threads
1,223,856
Messages
6,175,029
Members
452,606
Latest member
jkondrat14

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