Double V lookup

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
319
Office Version
  1. 365
Platform
  1. Windows
How do you do a double Vlookup for multiple lookups.
I want to lookup column R, and then the row that has a "yes" from column S, then the values for the yes column in 6 different cells.

So, if R=7.5, and then the row with "yes" i want the 6 values from that row in 6 different cells

Open Roof Structure Wind Load - Part 5 ASCE 7.xlsx
RSTUVWXY
440no2.4-3.31.8-1.71.2-1.1
45no1.8-1.71.8-1.71.2-1.1
46yes1.2-1.11.2-1.11.2-1.1
477.5no3.2-4.22.4-2.11.6-1.4
48no2.4-2.12.4-2.11.6-1.4
49yes1.6-1.41.6-1.41.6-1.4
Beam design
Cell Formulas
RangeFormula
S44,S47S44=$O$9
S45,S48S45=$O$10
S46,S49S46=$O$11
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
So, if R=7.5, and then the row with "yes" i want the 6 values from that row in 6 different cells
That could be not be difficult but you can't keep cells merged like in Column R of your sample data

Check this -

All Records.xlsb
RSTUVWXY
440no2.4-3.31.8-1.71.2-1.1
450no1.8-1.71.8-1.71.2-1.1
460yes1.2-1.11.2-1.11.2-1.1
477.5no3.2-4.22.4-2.11.6-1.4
487.5no2.4-2.12.4-2.11.6-1.4
497.5yes1.6-1.41.6-1.41.6-1.4
50
51
52LOOKUP
530 & Yes1.2-1.11.2-1.11.2-1.1
547.5 & Yes1.6-1.41.6-1.41.6-1.4
Sheet1
Cell Formulas
RangeFormula
T53:Y53T53=XLOOKUP(1,($R$44:$R$49=0)*($S$44:$S$49="yes"),T$44:T$49,)
T54:Y54T54=XLOOKUP(1,($R$44:$R$49=7.5)*($S$44:$S$49="yes"),T$44:T$49,)
 
Upvote 0
thanks,
I expanded on this and figured a little more out along the lines of yours. Check this out, now the only time my values dont work is when my cell M26 is 7.5

Book2
JKLMNOPQRSTUVWXY
25Lower Angle:Upper Angle:Diff
2607.5
27Zone 1:1.2-1.12.6-2.31.4-1.2
28Zone 2:1.2-1.12.6-2.31.4-1.2
29Zone 3:1.2-1.12.6-2.31.4-1.2
30
31
32
33
34
35
36
37
38
39
40
41
42Clear Wind Flow
43yesZone 3Zone 2Zone 1
440no0no2.4-3.31.8-1.71.2-1.1
450no0no1.8-1.71.8-1.71.2-1.1
460yes0yes1.2-1.11.2-1.11.2-1.1
477.5no7.5no3.2-4.22.4-2.11.6-1.4
487.5no7.5no2.4-2.12.4-2.11.6-1.4
497.5yes7.5yes1.6-1.41.6-1.41.6-1.4
5015no15no3.6-3.82.7-2.91.8-1.9
5115no15no2.7-2.92.7-2.91.8-1.9
5215yes15yes1.8-1.91.8-1.91.8-1.9
5330no30no5.2-53.9-3.82.6-2.5
5430no30no3.9-3.83.9-3.82.6-2.5
5530yes30yes2.6-2.52.6-2.52.6-2.5
5645no45no5.2-4.63.9-3.52.6-2.3
5745no45no3.9-3.53.9-3.52.6-2.3
5845yes45yes2.6-2.32.6-2.32.6-2.3
Sheet2
Cell Formulas
RangeFormula
K27K27=VLOOKUP(K26&$S$43,$Q$44:Y58,8)
L27,N27L27=VLOOKUP(K26&$S$43,$Q$44:Y58,9)
M27M27=VLOOKUP(M26&$S$43,$Q$44:Y58,8)
O27:P29O27=M27-K27
K28,M28K28=VLOOKUP(K26&$S$43,$Q$44:Y58,6)
L28,N28L28=VLOOKUP(K26&$S$43,$Q$44:Y58,7)
K29,M29K29=VLOOKUP(K26&$S$43,$Q$44:Y58,4)
L29,N29L29=VLOOKUP(K26&$S$43,$Q$44:Y58,5)
Q44:Q58Q44=CONCATENATE(R44&S44)
 
Upvote 0
You need to change the last option in your VLOOKUP's to 0 or FALSE for exact match.
VLOOKUP(M26&$S$43,$Q$44:Y58,8,0)
 
Upvote 0
Solution
If you didn't want to unmerge column R or individually enter the column of the lookup, you could consider something like this.
It assumes each of those sections in column S are the same (no, no, yes in this example)
Note that I have removed the ":" from column J. They could be put back in but the formula would become a bit longer.
The formula in K27 is copied across 1 column and down. Same for the formula in M27.

22 10 09.xlsm
JKLMNQRSTUVWXY
25Lower Angle:Upper Angle:
2607.5
27Zone 11.2-1.11.6-1.4
28Zone 21.2-1.11.6-1.4
29Zone 31.2-1.11.6-1.4
30
41
42Clear Wind Flow
43yesZone 3Zone 2Zone 1
440no2.4-3.31.8-1.71.2-1.1
45no1.8-1.71.8-1.71.2-1.1
46yes1.2-1.11.2-1.11.2-1.1
477.5no3.2-4.22.4-2.11.6-1.4
48no2.4-2.12.4-2.11.6-1.4
49yes1.6-1.41.6-1.41.6-1.4
5015no3.6-3.82.7-2.91.8-1.9
51no2.7-2.92.7-2.91.8-1.9
52yes1.8-1.91.8-1.91.8-1.9
5330no5.2-53.9-3.82.6-2.5
54no3.9-3.83.9-3.82.6-2.5
55yes2.6-2.52.6-2.52.6-2.5
5645no5.2-4.63.9-3.52.6-2.3
57no3.9-3.53.9-3.52.6-2.3
58yes2.6-2.32.6-2.32.6-2.3
Lookup
Cell Formulas
RangeFormula
K27:L29K27=INDEX($T$44:$Y$58,MATCH($K$26,$R$44:$R$58,0)+MATCH($S$43,$S$44:$S$58,0)-1,MATCH($J27,$T$43:$Y$43,0)+COLUMNS($K:K)-1)
M27:N29M27=INDEX($T$44:$Y$58,MATCH($M$26,$R$44:$R$58,0)+MATCH($S$43,$S$44:$S$58,0)-1,MATCH($J27,$T$43:$Y$43,0)+COLUMNS($K:K)-1)
 
Upvote 0
Although the VLOOKUP solution works fine, it requires an additional helper column. So I personally find Peter's solution much better than that. However, string concatenation is also widely used as a VLOOKUP helper method that might help future readers, so, I won't change the marked solution in this thread unless @jrisebo thinks Peter's solution is the way to go as well and mark it as the solution.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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