Ho to get multiple column values in one shot thru vlookup

Annalina

New Member
Joined
May 21, 2007
Messages
14
Hi Friends,

How r u ?

My problem is how do i get multiple column values at one shot.
For example in one excel sheet i have columns A,B,C,D,E and in A column i have all the Partner ID's and rest of the columns i have the data.

Now in other excel file I have Partner ID's which are not in order...now i want the data in all 5 columns according to partner id's from the previous sheet i need to do a vlookup function for five times to get the same data....is there any way that we can do it in one shot.
Pls help me out.....

Thanks a lot in advance.
Hava fun filed day.
:biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin:
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Copy and paste the same Vlookup() formula to all the five columns and just change the column number parameter in the other 4 columns. Copy down the formula and you are done.
 
Upvote 0
Hi,

Assume that all your data in Sheet1


=VLOOKUP($A2,Sheet1!$A:$E,COLUMNS($A$1:B$1),0)

where a2 houses the partner id.

HTH
 
Upvote 0
Hi Annalina,

It can be done via a query table (or similar use of SQL). Most users consider this an advanced approach and it has its own quirks. It does not use formulas on the spreadsheet and has a few good points such as speed and ability to 'lookup' closed files & databases.

Some pointers - name the ranges (this isn't strictly necessary but might be easier), headers to all fields, make sure the file has been saved at some time ever. Menu path Data, Import External Data, New Database query. Select the file and follow the wizard. You can select two tables from the wizard and create the join between them in MS Query or select one table in the wizard and add the second in MS Query (either via the menu & icons, or, by directly editing the SQL).

If you're interested, I suggest you look in help or google for more information. If you have a question on this approach, please post again in this thread.

Or, it can be done via VBA. And instead of a query table one might use ADO or alternative. Or without this SQL type approach, a different way would be via VBA (such as using arrays).

regards, Fazza
 
Upvote 0
Hi,

Assume that all your data in Sheet1


=VLOOKUP($A2,Sheet1!$A:$E,COLUMNS($A$1:B$1),0)

where a2 houses the partner id.

HTH

Hi Krishna

I suppose this can be done in an index(match()) alternate to vlookup()? I guess I need to replace the column number in index() with "COLUMNS()".

Am I correct?
 
Upvote 0
Hi Krishna

I suppose this can be done in an index(match()) alternate to vlookup()? I guess I need to replace the column number in index() with "COLUMNS()".

Am I correct?

Hello all,

I am looking forward to implement this logic in my data and seems this does not work.

In the main worksheet "Retail_cust_mobile#" I have two columns Mobile 1 & Mobile 2 which I need to lookup and match with all the mobile numbers in another worksheet. How do I incorporate the above logic of multiple columns in this to get the desired accurate result?

I tried specifying two cell references for two columns with the & operator in the match function but that does not work either.

Any help and I would be obliged.

many thanks for your help.
RetailCustomers.xls
EFGH
8210Mobile1Mobile2ResultsonthebasisofMobile#
82119314148317DoesNotExist
82129314194225DoesNotExist
82139314205987DoesNotExist
82149314208488DoesNotExist
82159314250942DoesNotExist
82169314484036DoesNotExist
82179314494801DoesNotExist
82189314500321DoesNotExist
82199314500680DoesNotExist
82209314504322DoesNotExist
82219314508296DoesNotExist
82229314508861DoesNotExist
82239314509977DoesNotExist
82249314511417DoesNotExist
82259314516055DoesNotExist
82269314516862DoesNotExist
82279314529005DoesNotExist
82289314531511DoesNotExist
82299314538800DoesNotExist
82309314567911DoesNotExist
82319314616988DoesNotExist
RetailCust_Mobile#
 
Upvote 0
Hi,

Does this

=LOOKUP(9.999999999E+307,CHOOSE({1,2,3},0,VLOOKUP(E8211,Collated_Advisory_Email!$B$2:$D$917,3,0),VLOOKUP(F8211,Collated_Advisory_Email!$B$2:$D$917,3,0)))

format the cell

[=0]"Doesn't Exist";General

help you?
 
Upvote 0
oh thank you so much, Krishna.

I have not tested this on my data yet. However, if you can please let me know how do I incorporate this into index(mtach()) rather than vlookup().

This is because I need to use this formula to do a number of different base lookups and all the field columns which I want to retrieve are on the left of the key fields in my data range.
 
Upvote 0
Hi,

=LOOKUP(9.999999999E+307,CHOOSE({1,2,3},0,INDEX(Collated_Advisory_Email!$D$2:$D$917,MATCH(E8211,Collated_Advisory_Email!$B$2:$B$917,0)),INDEX(Collated_Advisory_Email!$D$2:$D$917,MATCH(F8211,Collated_Advisory_Email!$B$2:$B$917,0))))

HTH
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,797
Members
449,337
Latest member
BBV123

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