plasteredric
09-16-2017, 01:40 PM
Evening everyone.
I currently have the following code to copy a range of data from one sheet to another. (There will be multiple destination sheets which will all have different names.)
Sub GET_CLEAN_RTR_DATA()
' GET_CLEAN_RTR_DATA Macro
Dim sStartSheet As String
sStartSheet = ActiveSheet.Name
If UCase(Sheets("RTR_IMPORT").Range("J2")) = "FALSE" Then
MsgBox "RTR Headers Do Not Match", 0, "RTR Check Error"
Exit Sub
End If
Range("RTR_CLEAN_DATARANGE").Copy
Worksheets(sStartSheet).Range("RTR_DATA_PASTEPOINT").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A1").Select
End Sub
This works as it is, but for each new sheet another Named range is defined (RTR_DATA_PASTEPOINT) for that sheet.
Is there a better, more efficient way of doing this?
Cheers
I currently have the following code to copy a range of data from one sheet to another. (There will be multiple destination sheets which will all have different names.)
Sub GET_CLEAN_RTR_DATA()
' GET_CLEAN_RTR_DATA Macro
Dim sStartSheet As String
sStartSheet = ActiveSheet.Name
If UCase(Sheets("RTR_IMPORT").Range("J2")) = "FALSE" Then
MsgBox "RTR Headers Do Not Match", 0, "RTR Check Error"
Exit Sub
End If
Range("RTR_CLEAN_DATARANGE").Copy
Worksheets(sStartSheet).Range("RTR_DATA_PASTEPOINT").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A1").Select
End Sub
This works as it is, but for each new sheet another Named range is defined (RTR_DATA_PASTEPOINT) for that sheet.
Is there a better, more efficient way of doing this?
Cheers