Hi there! Struggling excel novice. I have a spreadsheet that has 2 tabs. "Input" to display results, and a "Data" tab. On the input tab I have a selection area to input zipcodes to match criteria from the "data" tab. I'm trying to then calculate the average population for multiple zipcodes based upon those chosen on the Input tab. Additionally, my data has different dates for the population statistics, though only want to grab the latest population.
I was able to use this formula to calculate the average, though I have to manually input the zip codes into the formula. I need this to calculate based on zipcodes selected on my "Input" screen automationally.
Here's the formula I was able to use that worked with inputting the zipcodes within the formula:
=SUMPRODUCT(SUMIFS(Data!D:D,Data!A:A,"201306",Data!B:B,{"08085","08084","07001","07002","07003"}))/SUMPRODUCT(COUNTIFS(Data!A:A,"201306",Data!B:B,{"08085","08084","07001","07002","07003"}))
I'm trying to use a formula like below, which has a Named Range on the "Inputs" screen to choose the zip codes automatically:
=SUMPRODUCT(SUMIFS(Data!D:D,Data!A:A,"201306",Data!B:B,ZIPCODES))/SUMPRODUCT(COUNTIFS(Data!A:A,"201306",Data!B:B,ZIPCODES))
D Column = Population Stats
A Column = Date of Population Stats (201306)
B Column = Zip Codes
Attached is also a sample of my spreadsheet. Thank you in advance for any help you can provide!
Bookmarks