I found a post on converting code from being dependent on the clipboard to being independent of the clipboard. It takes this code,
Sheets("London").Select
Range("H9:H16").Copy
Sheets("Yearly Total").Select
Range("D9").Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
and converts it to this,
Sheets("Yearly Total").Range("D9:D16") = Sheets("London").Range("H9:H16").Value
I get this code when I record a copy and paste macro.
Sub Macro1()
'
' Macro1 Macro
'
'
Range("R1:R19").Select
Selection.Copy
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Prime Bench Main").Select
Range("A3").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
The issue I am having is getting it to work with my use of relative refrences. This macro would be used multiple times, so it would insert the text into the next available column and I don't know how to do that. Any help would be appreciated.
Bookmarks