Monday, April 6, 2009

Excel JUMP in now

Vlookup explained.

A vlookup is checking a cell or range etc to see if it is exists somewhere else.

okay so you have an excel spreadsheet with a list of names. You have another spreadsheet with a list of names. Your boss has asked you to see if there are any names on the second list that already exist on the first list. If you do then mark them with an Indicator.

so type the following items into excel start in cell a1 and work your way down.
cell a1 - Employees
cell a2 - Jim Sandal
cell a3 - Brian Shoe
cell a4 - Karen Boot
cell a5 - Mark Slipper

Then in the same spreadsheet start in cell d1 and work your way down type in the following
cell d1 - Employees
cell d2 - Kim Sandal
cell d3 - Mark Slipper
cell d4 - Andy Shoe
cell d5 - Karen Boot

Now take the following formula and add it to cell b2
=vlookup(a2, D:D, 1, 0)
then hit enter
copy the same formula in cells b3, b4, and b5

What do you see, if it worked out right then you should see an #N/A in cells B2, b3 and in cells b4 and b5 you should see Mark Slipper and Karen Boot respectively.

So vlookup explained:
=vlookup - vertical lookup
a2 - look at the value in cell a2)
D:D - check to find a match in any row in column D
1 - if found return the value in the row that matched in column D
0 - if not found return an #N/A

Cool tid-bit 1
If you had put a value of 1 instead of a zero this would of returned a value for all records.. why because 1 indicates a like match not an abosolute match like the zero does. Do not make this mistake many have.

Cool tid-bit 2
if instead of D:D you specified D1 : D30, this might not get you the values you want, you may find that you have a match in your first list to your second list when you are eyeing it over you notice #N/A values. That is because when you specifiy a specific range, it goes through it like a list starting at the top and going to the bottom. So if it has already gone by one of your values in the range, it will not go back to the top and start again. if you specify the D:D it will continue to keep looping so to speak to see if any value matches.

Cool tid-bit 3
I have multiple columns in my second list and when I do find a match i want to return a value from that list to my first list. (ie. outstanding balances in a new month)
.... more to follow..

No comments:

Post a Comment