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: 2
  • 1732677055302.png
    1732677055302.png
    184.8 KB · Views: 3

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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