mercredi 31 juillet 2019

VLOOKUP multiple columns for different months

I am trying to VLOOKUP a value with multiple columns. So I have a chart with ZIP codes, states, and an avg, min, max, std dev, etc for every month of the year.
Here is an example of one month for reference:

enter image description here

Next, I want to basically make a chart like so. In the AVG column I want to VLOOKUP the zip code, match it to the month and have it display the avg value (from the table above) for the correct month.

enter image description here

Is there any way to do this? Here is what I have tried thus far (the sheet with the first image is sheet 1, image 2 is sheet 2)

VLOOKUP(Sheet2!A2,Sheet1!A2:Z100,if((Sheet2!B3=2, vlookup(Sheet2!A2, Sheet1!A2:Z100,3),"")))

I am not really sure how to change the part where it goes to column 3 so that it will change for each month.

Aucun commentaire:

Enregistrer un commentaire