• 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.

Something Like a Query...

Carlo76ita

New Member
Hi everyone.
I just wonder if I can solve this problem.
I have two sheets in an Excel Workbook.
The first has more than 80.000 lines of data. [ Sheet1 ]
One of the columns is 'codvar'. [ for coding examples, let's say column A ]
The second has only 21.600 lines of data. [ Sheet2 ]
One of the columns is 'codvar'. [for coding examples, let's say column B ]
Obviously, ALL THE 'codvar' values in Sheet2 exist in Sheet1.

What I need is to get a third sheet [Sheet 3] where I read
'codvar' value and then some columns from Sheet1 and some columns from Sheet2
----------------------------------------------------------------------------------------------
Sheet1 :
A B C D
1 800 name1 prp1C prp1D
2 500 name2 prp2C prp2D
3 400 name3 prp3C prp3D
4 150 name4 prp4C prp4D
5 210 name5 prp5C prp5D

Sheet2 :
A B C D
1 009 150 blah red
2 003 400 bleh blue
3 002 210 bluh green

Sheet3 :
A B C D E
1 150 blah red prp4C name4
2 400 bleh blue prp3C name3
3 210 bluh green prp5C name5

I know I can figure out with a sql query, but I need it to work on various files on excel
and then import the files into another software.

Any suggestion, please ?

Thank you so much

Carlo Gonella
 
Hi Carlo,

I think this can be done with formula & VBA. Performance will vary for both. If you can upload a sample file with say some data and which columns from which sheet to go in which column of sheet 3, than may be some body here can help you out here.

Regards,
 
Back
Top