Vlookup and Match with two criteria

MrBurn5

New Member
Joined
Jul 4, 2016
Messages
48
I'm working on a little project to track real estate transactions and I'm running in to issues. Data needs to be looked up by zone and suburb code in the first two columns. I then want to pull the listings from each year and average sale price from each year (in different formulas obviously) to chart the growth and shrinkage.

I followed a tutorial I found but am not getting the same outcome. I don't know if this is because I'm using all alpha numeric inputs or not but I get the #N/A error none-the-less. Any help would be appreciated.

Excel 2016 (Mac) 32 bit
ABCDEFGHIJKLMNOPQRSTUV
1
2
32016201520142013
4AreaAreaSuburb (SIC)ListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceZoneSuburb
5e12ew
6East West ChesterE12EW294$230,677$210,000272$207,200$194,950263$202,834$187,000258$182,244$176,750#N/A#N/A#N/A#N/A
7AmeliaC01AM92$149,100$146,87590$139,428$140,00079$123,676$130,00079$121,913$128,000
8BataviaC01BA26$96,138$107,50022$122,543$114,50016$93,112$97,45015$67,114$38,107
9Batavia Twp.C01BT336$184,628$175,000307$177,301$175,000259$175,338$168,000237$160,511$150,500
10Pierce Twp.C01PI154$232,909$220,000128$228,779$213,000141$214,679$182,000117$212,812$179,250
11Union Twp.C01UN667$187,801$167,000655$173,957$153,900558$168,050$155,000592$157,859$149,175
12LovelandC02LO24$317,168$213,50041$299,886$242,00034$325,218$242,50042$323,186$346,000
13Miami Twp.C02MI635$263,609$243,000599$243,883$220,000586$236,679$207,450577$238,304$210,000
14MilfordC02ML61$187,386$154,90061$171,452$147,00051$144,913$125,00051$160,827$130,000
15BethelC03BE36$87,819$94,11338$70,416$60,75025$81,991$74,00030$61,498$47,000

<tbody>
</tbody>
page 1

Array Formulas
CellFormula
S6{=INDEX(B6:F173,MATCH(1,(B6:F173=S5)*(C6:F173=T5),0),4)}
T6{=INDEX(C6:I173,MATCH(1,(C6:I173=T5)*(D6:I173=U5),0),7)}
U6{=INDEX(D6:L173,MATCH(1,(D6:L173=U5)*(E6:L173=V5),0),10)}
V6{=INDEX(E6:O173,MATCH(1,(E6:O173=V5)*(F6:O173=W5),0),13)}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
what results are you trying to get in S6:V6?

since you are trying to look up multiple values for two fields (Listing & Avg Price)

Can you explain exactly where all 8 values are going? And where are your lookup values? You are only trying to find it for the inputs highlighted in yellow? You explained a lot but the whole picture is still a little vague.
 
Last edited:
Upvote 0
Try this array formula in S6 - observe carefully the references in D$6:D$173 (relative column); others ranges should use absolute columns and rows references
=INDEX(D$6:D$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))
Ctrl+Shift+Enter

Copy across till AD6

Hope this helps

M.
 
Upvote 0
Yes! That's it. Matrixes are not my forté and I'm still getting the hang of them. That seems to have worked when I applied it to the subsequent columns. Thank you Marcelo.
 
Upvote 0
Hold up, something unexpected popped up... I now get the results I want in S7:V8 where it shows the total listings and average prices. I can chart the listings fine in S8:V8, but when I chart the prices in S7:v7 the results on the chart are all zeros with a range of 0-1 on the x axis.


Excel 2016 (Mac) 32 bit
ABCDEFGHIJKLMNOPQRSTUV
32016201520142013
4AreaAreaSuburb (SIC)ListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceListingsAvg. PriceMed. PriceZoneSuburb
5C03WT
6East West ChesterE12EW294$230,677$210,000272$207,200$194,950263$202,834$187,000258$182,244$176,7502013201420152016
7AmeliaC01AM92$149,100$146,87590$139,428$140,00079$123,676$130,00079$121,913$128,000Price$87,744$134,183$161,636$143,317
8BataviaC01BA26$96,138$107,50022$122,543$114,50016$93,112$97,45015$67,114$38,107Listings27293138
9Batavia Twp.C01BT336$184,628$175,000307$177,301$175,000259$175,338$168,000237$160,511$150,500
10Pierce Twp.C01PI154$232,909$220,000128$228,779$213,000141$214,679$182,000117$212,812$179,250
11Union Twp.C01UN667$187,801$167,000655$173,957$153,900558$168,050$155,000592$157,859$149,175
12LovelandC02LO24$317,168$213,50041$299,886$242,00034$325,218$242,50042$323,186$346,000
13Miami Twp.C02MI635$263,609$243,000599$243,883$220,000586$236,679$207,450577$238,304$210,000
page 1
Cell Formulas
RangeFormula
S7{=INDEX(N$6:N$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
S8{=INDEX(M$6:M$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
T7{=INDEX(K$6:K$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
T8{=INDEX(J$6:J$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
U7{=INDEX(H$6:H$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
U8{=INDEX(G$6:G$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
V7{=INDEX(E$6:E$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
V8{=INDEX(D$6:D$173,MATCH(1,($B$6:$B$173=$S$5)*($C$6:$C$173=$T$5),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I don't understand what you are trying to do. You wrote in post #1
"I then want to pull the listings from each year and average sale price from each year..."

Which results(values) do you want and where they should be displayed? Please, clarify.

M.
 
Upvote 0
I figured out the problem - don't laugh.

The your formulas did exactly what they were supposed to do, but I did not know that the data was converted from a PDF in the most literal sense. So all of the "$" signs were causing the chart to read is as though it were a letter.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,820
Members
449,469
Latest member
Kingwi11y

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