I need a VBA code for a button which when clicked browse for other excel file, search for specific sheet named “Farmer History” in it. In this sheet it looks for A1 complete row and search heading “Crop Area” and copy this column data to main file(where button embedded) in sheet named “Berkhund” at address F3.
The same to be done for other 2 columns too i.e
Looks for “Target Qty” in first row at same sheet “Farmer History” and paste in main file sheet “Berkhund” at address R3
Looks for “Commulative Sold” in first row at same sheet “Farmer History” and paste in main file sheet “Berkhund” at address S13
Search multiple headings in other sheet, copy data and paste in main file
- Zahid0111
- Thread is marked as Resolved.
-
-
-
Are the files always the same format, i.e. are the headings in the same positions?
-
For destination they are on same position but from source position of header changes. That,s why i want to search for header and then copy it,s value to main file
-
I've set a macro to copy the Crop Area. Please let me know if this is what you want. If it is the code can be amended to copy the other data.
I see Column R is hidden in the dashboard
-
Yes it,s working thank you but it is copying header too..i don,t want header to be included..i need only data below header.
-
Hi i have included (.Offset(1)) before .copy. Now it,s working fine..
Thank you so much for your kind time and help..
-
Pleased to help
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!