ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Limelight Media - ExcelTip.com Books > F1 Get the most out of Excel Formulas & Functions

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-06-2007, 06:20 AM
davelyons davelyons is offline
Registered User
 
Join Date: 01 Aug 2007
Posts: 2
davelyons is on a distinguished road
Vlook up? any 1 explain how to use please?

can any 1 explain how to use vlookup and what is the difference between Vlooup and lookup?



cheers
Reply With Quote
  #2  
Old 08-06-2007, 06:54 AM
daddylonglegs's Avatar
daddylonglegs daddylonglegs is offline
Forum Moderator
 
Join Date: 14 Jan 2006
Location: England
Posts: 4,920
daddylonglegs will become famous soon enough daddylonglegs will become famous soon enough
Excel help is a good place to start, otherwise, here's an example

=VLOOKUP(A2,D1:F10,2,0)

This formula looks up A2 in the first column of the range (D1:D10) and, if found, returns the value in the same row from the column specified. The 2 dictates column 2 of the range, i.e. column E.

...so if A2 is found first in D5 then the formula returns the value in E5

This is the most common version of VLOOKUP, with a 4th argument of 0 (or FALSE) which means that VLOOKUP searches for an exact match only and nothing needs to be sorted.

If you use VLOOKUP with no 4th argument (or use 1 or TRUE), e.g.

=VLOOKUP(A2,D1:F10,2,1)

then D1:D10 (the "lookup range") must be sorted ascending and the formula will return the value from E1:E10 on the same row as the "closest match" in D1:D10, i.e. the greatest value smaller than or equal to the lookup value (A2)

LOOKUP always works like this second version of VLOOKUP, i.e lookup range must be sorted ascending.

You can either use the "vector" type,

=LOOKUP(A2,D1:D10,E1:E10)

where match is found in first vector (D1:D10) and value returned from corresponding position of the second (E1:E10), this is especially useful for "left lookups" where return column is to the left, e.g.

=LOOKUP(A2,D1:D10,C1:C10)

or the "range" type where lookup range is the first column of the lookup range and return range is the last - except where lookup range is wider than it is tall, in which case the lookup range is the first row and the return range is the last row,

e.g.

=LOOKUP(A2,D1:F10)

looks up A2 in D1:D10 and returns the corresponding value form F1:F10.

=LOOKUP(A2,D1:H3)

looks up A2 in D1:H1 and returns the corresponding value form D3:H3.

This last version is similar to HLOOKUP
Reply With Quote
  #3  
Old 11-29-2007, 06:59 AM
ram23499 ram23499 is offline
Registered User
 
Join Date: 29 Nov 2007
Posts: 1
ram23499 is on a distinguished road
vlookup more columns

can any one explain how to do vlookup for more than one column
Reply With Quote
  #4  
Old 11-29-2007, 07:27 AM
EdMac's Avatar
EdMac EdMac is online now
Forum Guru
 
Join Date: 23 Jan 2006
Location: Exeter, UK
Posts: 1,166
EdMac is on a distinguished road
Ram,

Can you be more specific - suggest you post your query in the general forum.

Ed
Reply With Quote
Reply

Bookmarks

New topics in F1 Get the most out of Excel Formulas & Functions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -4. The time now is 11:23 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0