Return selected staff with count

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
I need a report that details the available staff and counts the number of shifts they are available for. The report should only list the available staff as per the example. Looking for a function based solution.


Lookups Match.xlsx
ABCDEFGH
1StaffAvailable ShiftsDesired Report
2PeterPeterKenPeterPeter2
3HarryKenMaryTomKen2
4FredMaryMary2
5MaryTom1
6Ken
7Tom
Sheet13
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about
Fluff.xlsm
ABCDEFGH
1StaffAvailable ShiftsDesired Report
2PeterPeterKenPeterPeter2
3HarryKenMaryTomKen2
4FredMaryMary2
5MaryTom1
6Ken
7Tom
Data
Cell Formulas
RangeFormula
G2:G5G2=UNIQUE(TOCOL(C2:E7,1))
H2:H5H2=COUNTIFS(C2:E7,G2#)
Dynamic array formulas.
 
Upvote 0
Thanks Fluff for the quick response, I was just about to edit my post and ask for an Excel 2019 solution as the person seeking the solution does not have 365.
 
Upvote 0
Ok, how about
Fluff.xlsm
ABCDEFGH
1StaffAvailable ShiftsDesired Report
2PeterPeterKenPeterPeter2
3HarryKenMaryTomMary2
4FredMaryKen2
5MaryTom1
6Ken  
7Tom  
Data
Cell Formulas
RangeFormula
G2:G7G2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$2:$A$7)/(COUNTIFS($C$2:$E$7,$A$2:$A$7)>0),ROWS(G$2:G2))),"")
H2:H7H2=IF(G2="","",COUNTIFS($C$2:$E$7,G2))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,671
Messages
6,126,131
Members
449,293
Latest member
yallaire64

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