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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Problem

Status
Not open for further replies.

newbie2181

Technical User
May 27, 2003
77
0
0
GB
Hi,
I am a bit stuck in excel. I have two worksheets of data that i need to find matching rows of data in each. This part i managed to do using VLOOKUP. My problem now is that i need to search the two sheets and then pull a figure out from another location if they match.

so i need to search column A on both sheets and if there is a match anywhere pull a figure from sheet 2 cloumn B on the same row the match was found?!?

I'm sure that makes no sense to anyone what so ever but if anyone has any ideas that would be great!!

Thanks a lot

Dan
 
A bit more detail would help as I'm not sure why VLOOKUP won't do the whole job for you, but assuming you have a set of daat in say A1:A20 on sheet 1, and your other table of data is in A1:B1000 on sheet 2, and that you want to look at the data on sheet 1 and if it matches any of the records in Col A on sheet 2, then bring back the value from Col B on sheet 2 to Col B on sheet 1:-

On sheet 1, in cell B1 put the following formula and copy down:-

=IF(ISNA(VLOOKUP(A1,Sheet2!$A$1:$B$1000,2,0)),"",VLOOKUP(A1,Sheet2!$A$1:$B$1000,2,0))

This ensures that you don't get error messages returned if no match is found

Regards
Ken...............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Hi thanks for the reply.

i think you've more or less got it. got sheet1 and sheet2. i need to type a formula in sheet1 that will check cloumn A in sheet2 against a column A in sheet1. if a match is found in both these columns then a figure from sheet2 column B on the same row the match was found needs to be displayed in sheet1 (i'm even confusing myself here!!)

Thanks a lot dan
 
OK, you should be sorted then, but if for any reason it's not quite there, then just post back.

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
ok cheers mate i'll play about with that and try and figure it out myself!! lol

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top