Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Excel > Extended use of VLOOKUP function


Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2008, 12:14 AM
Abbasi Abbasi is offline
Newcomer
 
Join Date: Aug 2003
Location: Islamabad
Posts: 11
Default Extended use of VLOOKUP function


Hello everybody

Sometimes, I have to struggle with my data a lot. Currently I am trying to extract data from a number of selective columns of the source sheet into a target sheet.

VLOOKUP function helps me retrieve data from a single column only. I intend to retrive data from more than one column, based on the same Lookup Value, in one go.

I will apprciate any help - doing it programmatically or using just a formula.
Reply With Quote
  #2  
Old 04-23-2008, 08:45 AM
Craiglowdon Craiglowdon is offline
Newcomer
 
Join Date: Apr 2008
Posts: 19
Default

im unsure of what you mean, if you want the cells in the same cell then you can do

VLOOKUP(lookupValue,DataArray,column,0) & " " & VLOOKUP(lookupValue,DataArray,column2,0) & " "

and so on changing the column as you go, if you want them in separate cells them just change the column value on the lookup formula which is the third variable in the formula. (shown in bold)

hope i understood correctly and that helps.
Reply With Quote
  #3  
Old 04-23-2008, 09:26 PM
Abbasi Abbasi is offline
Newcomer
 
Join Date: Aug 2003
Location: Islamabad
Posts: 11
Default

Thanks for the response, Craiglowdon.

I want to retrieve data from different source columns into corresponding columns, separately, in the destination sheet.

Further help will be appreciated.
Reply With Quote
  #4  
Old 04-24-2008, 04:25 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline
Out Of Office

Retired Moderator
* Expert *
 
Join Date: Mar 2005
Location: London, UK
Posts: 3,398
Default

Quote:
Originally Posted by Abbasi View Post
Thanks for the response, Craiglowdon.

I want to retrieve data from different source columns into corresponding columns, separately, in the destination sheet.

Further help will be appreciated.
Then put each of the suggested formulas into separate cells instead of concatenating them.

Also see response you got here:
http://www.mrexcel.com/forum/showthread.php?t=315823

If you need further help then please explain your question more clearly.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->