Vlookup or...?

brunette

Board Regular
Joined
Aug 19, 2003
Messages
97
Hi guys,

I have a name in Cell A2. That same name will appear somewhere in column B, along with a cell value in column C.

I need to 1) find A2's corresponding name somewhere in column B and 2) display the value of column C in cell D1 (so that's the cell I'll be typing my formula in)

to try to exemplify:

1. A B C D
2. x y 1 (formula goes here) - formula result here would be 657
3. a z 222
4. b f 999
5. c g 000
6. d x 657

I hope I exemplified clearly enough and that you can help. Thanks in advance :)
Bru
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try:
Rich (BB code):
=VLOOKUP(A2,$B$2:$C$100,2,0)
Change 100 to whatever row number your last item is in. This assumes all of the names in column B are unique
 
Last edited:
Upvote 0
Morning guys,

First of all, thanks a bunch for all your replies yesterday. Sadly, being a Monday, my head was just not in it and I ended up walking away from this before it did me in.

With fresh eyes, I retackled this again this morning.

Here's what's happening:

JackDanIce's formula is working, insofar as it's not returning an error (which the others are). However, there's a problem. While it is returning a value from the right column, it's returning the value from the wrong row.

I know I simplified my example but let me explain this in real values, if I can (sadly, I can't submit screenshots due to company proxy limitations :s)

I have a userID in Column A. Their name and a bunch of other unimportant data is in columns B-H and in column J. In column K I will also have a userID. Column L contains a serial number for the userID in column K. I need to match the 2 userIDs and copy the serial number from column L into column I for that corresponding user. The problem is that I have over 500 rows of userIDs and not all of them have serial numbers, so I can't just simply sort them, as there is often a HUGE gap in ID sequences :/

1. ColumA ColumnB Column I ColumnK ColumnL
2. user10 JoeSmith user10'sS/N user37 user37'sserialnumber
3. user39 JaneDoe user39'sS/N user78 user78'sserialnumber
4. user78 JohnDye user78'sS/N user10 user10'sserialnumber

I'm concerned I'm going to get a circular reference error for having the result cell in the middle of the array? If so, I can move things around and hide columns so that it fixes that but I'll worry about that once I get the formula to return the right info.

Thanks again for your help, guys, I really appreciate it. If you really need a screenshot to see what I'm on about, best I can do is provide a link to imageshack or something. Just let me know.

Regards,
Bru
 
Upvote 0
Quick Update,

Took another break and had an espresso coffee and...voilá! I got it to work - managed to tweak Patrao's formula and it did the trick.

Thanks loads again fellas!

Regards until next time,
Bru
 
Upvote 0
My formula should provide the correct value you want so I'd reason there's another problem that you're unaware of or not described. Based on what you've said, the formulae in column I should be:
Rich (BB code):
=VLOOKUP(A1,$K$1:$L$666,2,FALSE)
In my previous example, I had 0 instead of FALSE but it's one and the same, means you want an EXACT match. Change this to TRUE if you want the nearest match. Again, 666 can be changed to whatever your last row number is
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

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