Forum Discussion
Rory123908
Dec 03, 2021Copper Contributor
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 c...
Donald_Genes
Dec 03, 2021Brass 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
Rory123908
Dec 03, 2021Copper Contributor
wow, sounds great! Thanks very much!
- Donald_GenesDec 03, 2021Brass 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
- Rory123908Dec 03, 2021Copper ContributorHi, many thanks for your help, unfortunately this was not what I was looking for. In this new sheet, I only want rows which time matches in both. For example in sheet 1, there is time 0,1,2,3,4,5,6,7,9,10 (seconds), and in sheet2 there is time 0,2,4,6,8,10. Therefore, I am looking to merge the cells in sheet 3 so that the rows (0,2,4,6,10) are merged. Are you able to do this?
- Donald_GenesDec 03, 2021Brass ContributorOh, now i understand what you mean!