vlookup() returning multiple values

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to use vlookup() to return multiple values. User will enter the name in cell G2 and vlookup() will return phone number and address. So I selected 2 cells (I2 and J2) and typed this function

G2=VLOOKUP(G2,A2:C15,{2,3},flase)

and pressed ctrl+shift+enter

But I got error msg #Name . Not sure why? Any help would be very much appreciated.



namephone#address
mary111 main st
mary222 main st
mary333 main st
mary444 main st
mary555 main st
mary666 main st
mary777 main st
mary888 main st

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
VLOOKUP can only return a single value.
You would just write two VLOOKUP formulas, one to return column 2 and one to return column 3.
If you want them both in the same cell, just use CONCATENATE or & to sew them together, i.e.
Code:
[COLOR=#333333]=VLOOKUP(G2,A2:C15,2,false) & " " & [/COLOR][COLOR=#333333]VLOOKUP(G2,A2:C15,3,false)[/COLOR]
 
Upvote 0
You are welcome.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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