SOLVED

New Contributor

# VLOOKUP with two variable columns

Hi,

I have two drop down list cells in two different columns and I want the third column to display the correct value based on which two variables are selected.

The first column has 3no. variables (text) (glazing/shading type) and the second column has 4no. variables (north, south east and west) and I wish the third column to = a value based on the selected combination (number). See images attached.

Many thanks in advance.

Jamie

4 Replies

# Re: VLOOKUP with two variable columns

Let's say your lookup table is in range B2:D13. Dropdowns are in F2 and G2. Then you can apply formula:

=VLOOKUP(F2&G2,CHOOSE({1.2},B2:B13&C2:C13,D2:D13),2,FALSE)

Formula has to be entered as matrix with ctrl+shift+enter.

# Re: VLOOKUP with two variable columns

Many thanks for your reply, however when I do this it just states #ref!

My lookup table is outside of my main spreadsheet in cells ae11:ae22 (glazing type column), AF11:AF22 (orientation) and AG11:AG22 (solar gain watts).

My two drop downs are in S9 and T9.

There are two things I'm not sure of in spreadsheet, one is the orientation drop down list and second is how i have compiled the lookup list.

I have attached the spreadsheet for info. Could you please check it is correct?

Many thanks

Jamie

best response confirmed by jamie1978 (New Contributor)
Solution

# Re: VLOOKUP with two variable columns

I noticed that in your Excel sheet  {1.2}  was entered as   {1,2}. I work with german version of Excel and i have to enter   {1.2} in order to make the formula work. Try to enter {1.2}   as well. I hope it works. Otherwise you would have to check how data in curly brackets has to be entered in your version of excel.

I didn't understand that you want to copy formula down from cell U9 to U12.

=VLOOKUP(S9&T9,CHOOSE({1.2},\$AE\$11:\$AE\$22&\$AF\$11:\$AF\$22,\$AG\$11:\$AG\$22),2,FALSE)

Formula has to be adjusted and entered as matrix with ctrl+shift+enter and then it can be copied down.

# Re: VLOOKUP with two variable columns

Many thanks for your help much appreciated. I input 1,2 and it worked!

Thank you