Forum Discussion
I am trying to copy and paste data from a range of columns VBA
Do you have a defined function called VerifyHeaders in one of the modules? At a first glance, the VBA is a bit overcomplicated for a simple Copy and Paste function. I'm a bit confused by your last two notes in the macro, is there any data appending?:
' Go to sheet 2, look for the last row that is used then go to the last row below it
' Copy data from the first column to the the end of the column 1 but not column 1 and skip the second column before it in sheet 1 and paste it in the second column
Regarding the column order, will the Date and Fold columns always be in the same place and/or retain the header?
- Desno13Dec 31, 2020Copper Contributor
adversi Thanks for responding.
First q - So with that, I just wanted to confirm their presence before running the script. I got this idea from a youtube video - she saved the column names as an array so I followed through on it.
Second q - yes, they will always be in the same position. The last two columns will always be Date and Fold will always be the last two columns in the data and will always have the same header title "Date" and "Fold".