I have a large residential project where I need to split out aspects of each unit type across multiple buildings. For simplicity sake, I have unit types A, B, and C that have 2, 3, and 5 bedrooms respectively. I need to find out how many bedrooms are in Buildings X, Y, and Z knowing there are so many of each unit in each building as shown in the tables below:
Unit Type A Unit Type B Unit Type C Building X Building Y Building Z Bedrooms 2 3 5 x y z # of Unit Types per Building Building X Building Y Building Z Unit Type A 20 30 40 Unit Type B 10 25 60 Unit Type C 5 20 10
I've tried all manner of sumproduct, vlookup, hlookup, row, column, mmult, match, and index formulas to find the number of bedrooms in each building based on referencing the two tables and have had no luck. I am hoping someone here might be able to help me.
The best I understand it, to find (x,y,z) I need some sort of array formula that references how many bedrooms are in each unit type and how many unit types are in each building. The closest I got was with this formula in cell E2 for the building X bedrooms:
=SUMPRODUCT(B2:D2,VLOOKUP(TRANSPOSE(B1:D1),A4:D7,MATCH(E1,A4:D4,0),FALSE))
But I don't think it works because I can't seem to get the vlookup function to return an array. I'm also not sure if it did return an array it would work with the sumproduct.
Can vlookup return an array? If not, is there some other function I should be using?
I'm also new to this forum so let me know if I've not framed this question properly.
Please and Thank You.
Bookmarks