Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vlookup problem

Status
Not open for further replies.

tenbellies

Programmer
Dec 20, 2002
17
GB
Hi,


Not sure if this explains it very well but...

I need to use a vlookup formula in a workbook so that CODE1 (in a diffrent sheet, same workbook) and code 2 are the same it enters the number in the value column in another cell. Not all the code1's are in both worksheets


Code 1 Name Code 2 Value
123 Bermondsey 123 1
456 Bishopsgate 456 2
789 Canonbury 789 3


Thanks in advance
 
Please post your formula, (so we can determine which station)

Me transmitte sursum, Caledoni!
 
I need to use a vlookup formula in a workbook so that CODE1 (in a diffrent sheet, same workbook) and code 2 are the same it enters the number in the value column in another cell. Not all the code1's are in both worksheets

You need to be more specific. Your example data looks like one chunk of data in one sheet. What values are entries,what values are supposed to be from formulae, and which columns are in which sheet?

If ( and I'm guessing here ) you simply want to look up a code in a list and return the value next to it, a simple vlookup should do. If that's the case have you tried it?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
OK Thanks…

Data in sheet 1:

Code1 Name Value
123 Bermondsey 1
456 Bishopsgate 2
789 Canonbury 3

Data In Sheet 2
Code 2
123
456
789

What I need to do is find the match’s in Code 1 and Code 2 But put the “Value” in sheet 1 in the column next to Code 2 in sheet 2.

Not all the codes will be in sheet 2, but ALL are in sheet 1
 
Just use VLOOKUP, like this:
Code:
=IF(ISNA(VLOOKUP(A2,Sheet1!$A$2:$A99,3,FALSE)),"",VLOOKUP(A2,Sheet1!$A$2:$A99,3,FALSE))

If you have problems, post back with description of what's happening.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Thanks for the help i'm getting #ref! any further help greatly appriciated
 
That's a mistake on my part ... change the $A99 to $C99 in both places it is used.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Hooray! :-D

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top