• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formula to match Numbers in 2 different sheet colomns

Injinia

Member
Hi,


I have two sheets. Column A on both sheets has around 10000 numbers that are randomly input. Sheet 2 has data in columns B:G. I would like to match the numbers in sheet 1 and 2 and have the data B:G copied on sheet 1 if the number in column A matches in sheet 2.


-Injinia
 
Hi Injinia!


You could use a bunch of vlookups. Your formula in B2 would look like this:

'=VLOOKUP(A2, Sheet2!B:G, 2, FALSE)'

And copy downwards for the entire column in B.

For C2, it will read

'=VLOOKUP(A2, Sheet2!B:G, 3, FALSE)'

and so on.


I agree this isn't the most efficient way to do it (having 6 VLOOKUPS will make your sheet noticeably slower) but this is the only way I know to do this.
 
Hi,


Thanks completebhejafry! However, this formula returns (#value). The return value from sheet 2 is text, does this affect how the formula should work?


-Injinia
 
Oh, the fatal #VALUE error! :)

Most a formatting issue somewhere. See if you can clean up all your values, make sure there are no extra spaces at the end and so on.

Upload a sample sheet if all else fails.


VLOOKUP can pull in text data, no problem.


edit: after doing some reading, I believe a #VALUE error is caused when you're trying to reference data from a closed workbook. But I believe this is not what you are doing, right?
 
Back
Top