Returning all values based on criteria

blueice2627

New Member
Joined
May 21, 2018
Messages
10
Hey Everyone, hope you're all doing well. Got a head scratcher of a question that feels easy, but just can't get my head wrapped around it.

I'll try to keep this simple (strap in because this description is going to be difficult)

I work in hotels, that'll probably help in conceptualizing what i'm doing

We have a group of hotels (30+) that i'm tracking pick up for the next 10 days on. So each day, i create a new sheet with a new table (all in one workbook, but multiple sheets named with date) and plot down the rooms occupied for the current day through 10 days out. Each property has a unique code, and i already have about 2 months of data on multiple sheets inputted this way (meaning, i would like to not have to change things if i don't have to)

I have created different charts to help visualize the hotels by brand and/or each hotel specifically so that we can better keep track of trends, but i have decided that i want to have the ability to group by county.

To do this, i started by creating a reference table that uses each properties unique ID and made another column with the county.

So, now i have a final table that I want to calculate a counties occupancy. On this table, when i come in for the day, i will enter a new line with today's date and would like the table to calculate the counties occupancy based on a county input and total all the hotels that are within that county using the numbers from another sheet based on an indirect formula to refer to the sheet for that day and total the rooms from that day.

I came across a sumproduct/sumif formula that i feel is the key = sumproduct ( sumif ( range , criteria , sumrange ) )

I have an indirect formula to direct excel to the sheet based on the date to know which sheet to look at for values to add, but what I can't figure out is how to insert the criteria. The table that defines the criteria looks like this:
Hotel CodeRegion
Hotel 1West Side
Hotel 2West Side
Hotel 3West Side
Hotel 4North Side
Hotel 5North Side

I want a formula that will return Hotel 1, 2, and 3 if the region is set to West Side so i can insert that into the criteria to calculate for that region. Most regions will have 2+ hotels so the value returned needs to include all hotels in that region.

Sorry for the lengthy question and buildup. I'm guessing this will just be some sort of Index/Match kind of deal, but i'm having the biggest of brain farts this week it seems like.

Thanks!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Never mind, got it figured out. Used the same method as above, but created a unique index match array list that updates based on region selected and puts it all in a named range.

:)
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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