I have a set of data, as shown below, and I am using formulas to pull data from the columns nights, ADR and total. I am using COUNTIFS and SUMIS formulas to collect the data, which are working well. The issue I have is that I need to replicate this data and tables for multiple different buildings and units. Right now I am going through and editing each formula to reference the specific apartment I want as a criteria, which is taking me a long time. So I wanted to see if there was anyway I could reference a cell and use that as a criteria instead?
Here is a selection of the master data.
Here is a screenshot of the "pivot tables" I have created for myself to pull the data I need from the master data. Right now the formula I am using for 'Count of name' is =COUNTIFS({1. LOS, ADR and Occupancy data Range 6}, "PP01", {1. LOS, ADR and Occupancy data Range 7}, "1")
which references the master data. But I am having to update it for each row to be PP02, PP03 and such. Is there a way that I can change the formula so that it references the cell in the 'Unit' column, so it automatically searches for whatever is in that cell?