Copying of data from one excel file to other

Closed
sumit - Apr 6, 2010 at 07:14 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 6, 2010 at 10:29 AM
Hello,
I have a excel file which is having the list of filenames (eg- MEF_collection) in B column. Now i wanna open another excel file which is having same list of filenames in column D as the previous file.

The filenames in the column D exist as filename.h and filename.cpp (eg- MEF_collection.h , MEF_collection.cpp). Now i want to take the first 'filename' in column B as a string in the 1st excel file and search that string in the 2nd excel file in D column.

The filename in the D column is listed as ex- CAP_MEF_Engine\src\Layer_pub\MEF_collection.h
and  

CAP_MEF_Engine\src\Layer_pub\MEF_collection.cpp

If that 'filename.cpp' string is found then the corresponding data (integer value) from the column F should get displayed in the 1st file in E column corresponding to that particular 'filename' string.

If 'filename.cpp' is not found then it should search for the 'filename.h' in the same column and the corresponding data should get displayed in the 1st file as above.

Similarly i want to do for all the filenames in column B starting from the begining.

Please give me the VB code for this. I have tried alot but its not working. Please help me out with the VB code. It ll be very helpful.

Thank you

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Apr 6, 2010 at 10:29 AM
Could you add sample file at some share location like https://authentification.site and post the link here. Instead of two files, you can add the data on two sheets of excel,
0