Forum Discussion
Merging Sheets Using VBA
Hi there, I'm looking to implement a macro that means that I will be able to merge 2 sheets into a new sheet, for all rows that match in my time columns. Basically I have 2 sheets, each with a time column in column A. I want to copy all of the rows in both sheets that have the same time and put them all together in sheet 3. I have uploaded an example of my problem, would anybody be able to help with this? Many thanks! P.s I understand this can be done with power query, but I really do need this done with VBA!
5 Replies
- Donald_GenesBrass Contributor
I have a VBA code that does that, i shall help you
Let me download the excel file and do it and send it back to you
- Rory123908Copper Contributorwow, sounds great! Thanks very much!
- Donald_GenesBrass Contributor
Rory123908 Done! i created a new sheet called it data, so i can use vba to combine them based on their matching rows, and i told VBA to create a new column at the end to indicate the sheet names, like sheet1 and sheet 2