Hit a wall with aggregate function

MZING81

Board Regular
Joined
Mar 20, 2012
Messages
75
I've built a tool to help me process employee vacations requests.

The formula works below, it extracts the employee's seniority/rank, for the individual week(s) in order of seniority. But I want to add in preferences.
Say employee #1 wants Week #10,Week #12 and Week #13 on the calendar, with other employees selecting different weeks in a different order of preferences.
for Week #10 you'll have all the employees that selected that week and it'll the formula will list it in order of seniority. What I want it also do is to incorporate preferences.
And they're only allocated a max of 4 weeks receive in order of preference. I want the formula to ignore any of their selections that go beyond the 4 weeks.

=IF(ROWS(C$4:C4)>C$2,"",INDEX('WEEKS-REFERENCE'!$C$3:$C$22,AGGREGATE(15,6,(ROW('WEEKS-REFERENCE'!$C$3:$Q$22)-ROW('WEEKS-REFERENCE'!$C$3)+1)/('WEEKS-CLEANED'!$C$3:$Q$22=FINAL!C$3),ROWS($C$4:C4))))

Unfortunately the version of excel on my personal laptop doesn't handle Aggregates, but the other work machine does.

1732677213399.png

1732677024502.png

1732677129067.png


Any assistance is greatly appreciated.
 

Attachments

  • 1732676981698.png
    1732676981698.png
    102.6 KB · Views: 5
  • 1732677055302.png
    1732677055302.png
    184.8 KB · Views: 6

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,225,628
Messages
6,186,106
Members
453,337
Latest member
fiaz ahmad

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