duranimal86
New Member
- Joined
- Jul 24, 2019
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
I have a workbook with 2 sheets that are identical, except one of them has a data connection that can be refreshed. I want to be refresh the data and then run this code to automatically copy those columns (as values) to the other sheet. I tried to combine into a single operation, but it wouldn't work with more than 2 column references. The code below works, but it is slow and i know there are much better options.
VBA Code:
Sub CopyValues()
Sheet3.Range("F:G").Value = Sheet2.Range("F:G").Value
Sheet3.Range("L:M").Value = Sheet2.Range("L:M").Value
Sheet3.Range("O:P").Value = Sheet2.Range("O:P").Value
Sheet3.Range("S:T").Value = Sheet2.Range("S:T").Value
End Sub