Counting Unique Values from a Set List Based on Another Cell's Conditions

Justen

New Member
Joined
Feb 6, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I need help figuring out a formula that will allow me to count the number of unique occurrences for a list of values that show up within specific categories.

Basically, I have data like this:

AB
1Booking TypeRoom Number
2Office Hours123
3Office Hours125
4Event200
5Class101
6Event200
7Office Hours123
8Office Hours145
9Class145
10Event202
11Class101


And I have to figure out how many different rooms have been used for, say, Office Hour bookings. But, in addition, there are different types of rooms and I need to break it down further by room category.

For example:

Classrooms101, 145, 147, 148
Study Rooms123, 125, 134, 191
Event Spaces200, 202

So I need data to fill in the following:

ABCDE
1Booking TypeTotal Unique Classrooms UsedTotal Unique Study Rooms UsedTotal Unique Event Spaces UsedTotal Unique Spaces Used
2Office Hours??????
3Event??????
4Class??????

Total Unique Spaces Used is fairly straight-forward. I'm getting really stuck on trying to figure out how many different classrooms were used specifically for Office Hours booking, for example.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Justen,

You could always add a worker column for the Room Type.

Book1
BCDEFGHIJ
1Booking TypeRoom NumberRoom TypeRoom TypesRoom Numbers
2Office Hours123Study RoomsClassrooms101, 145, 147, 1482
3Office Hours125Study RoomsStudy Rooms123, 125, 134, 191
4Event200Event SpacesEvent Spaces200, 202
5Class101Classrooms
6Event200Event Spaces
7Office Hours123Study Rooms Total Unique Room Usage
8Office Hours145ClassroomsBooking TypeClassroomsStudy RoomsEvent SpacesTotal Unique Spaces Used
9Class145ClassroomsOffice Hours1304
10Event202Event SpacesEvent0033
11Class101ClassroomsClass3003
12
13
14
Sheet1
Cell Formulas
RangeFormula
H2H2=MATCH("*"&C2&"*",G2:G4,0)
G9:I11G9=COUNTIFS($B$2:$B$11,$F9,$D$2:$D$11,G$8)
J9:J11J9=COUNTIFS($B$2:$B$11,$F9)
D2:D11D2=INDEX($F$2:$F$4,MATCH("*"&C2&"*",$G$2:$G$4,0),0)
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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