Comparing two different excel files
I have two excel files on the my machine. the name is excel1.xls & excel2.xls. Pls note excel1.xls has two columns with name on spreadsheet : Deptname,Empname & excel2.xls has two columns with name on Spreadsheet : Empname, Salary.(Empname is unique)
I want to compare Empname from two excel sheets(excel1.xls & excel2.xls). using SELECT statement , want the output Deptname,Empname,Salary)in the file final.xls with the same column name.I m writing VBA code in the same file final.xls to do the job.
Is that feasible using VBA to write a select statement to compare the columns Empname like we do in database tables using connection string & recordset objects. If yes then please provide the SELECT statement or any other suggestion with solution is needed.