Returning multiples rows and columns using Vlookup or any other function

AdibKhaldi

New Member
Joined
Dec 4, 2018
Messages
2
Hi,

I have a data table to which I'm trying to do a vlookup to return all the columns of a matching lookup value, which I was able to do, but only one matching row would appear, while I want all matching rows (and not only the first match). Also, another issue I have is that a vlookup will only lookup the left most column while my lookup value is in the 3rd (City), so I suspect that Index+Match function would do? I couldn't paste a screenshot of the sheet, so here it is:

CategoryClient NumberCityPostal CodeProvince Office#
111334455HALIFAXC0A1K2NS11
211445566HALIFAXB3C7V10NS21
211556677MONTREALC0A1K3QC21
311667788MONTREALB3C7V11QC31
311778899MONTREALC0A1K4QC31
411890010TORONTOB3C7V12ON41
412001121TORONTOC0A1K5ON41
512112232VANCOUVERB3C7V13BC51
512223343VANCOUVERC0A1K6BC51

CategoryClient NumberCityPostal CodeProvince Office#
Return here:

<tbody>
</tbody>

Given that I want it to return multiple columns, I created the following formula : {=VLOOKUP("HALIFAX", D2:H12, {1,2,3,4,5}, FALSE)}

Also, if it would possible to have more than one lookup value, for example HALIFAX and MONTREAL, I don't know if a VBA code would be more appropriate in case no formula can execute it?

Thank you very much!

A.K
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Google "Excel Advanced Filter Lists". That is probably the simplest way to handle what you are trying to do. There is a copy to another location option that might work for you.
 
Upvote 0
Thank you very much, I was looking exactly for this! I didn't know Excel has an advanced filtering option, which makes the task so much easier compared to creating unnecessarily long and complex formulas :/
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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