What is the difference between Vlookup and Index and which one is better? Thanks.
What is the difference between Vlookup and Index and which one is better? Thanks.
Horses for courses: Index tells you which row (usually, can be column) in the search area contains your data.
VLookup acts like index then goes on to return a value from that row. (Hlookup is the same for returning from a column).
and usually we use INDEX & MATCH together(I prefer this combination)
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
VLOOKUP is specifically for looking down the lefthand column of a table and returning a value from the same row as the match.
INDEX is more versitile. You can use it to match both a value down a column and a value across.
=INDEX(A1:D4, MATCH("B", A2:A4,0), MATCH(3, B1:D1,0) = Gary
1 2 3 A Bob Joe Mary B Lynn Sid Gary C Hank Kim Luke
With INDEX, your Lookup value can be to the right of your returning values (can't do that with VLOOKUP)
ie. = INDEX(A1:A10, MATCH("Test", Q1:Q10,0)) looks in Column Q for "Test" and returns the value in Column A that is in the same row.
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks