[Solved] Macro in Excel to Copy a Worksheet (by referencing every cell)


If you want to avoid the clipboard may I suggest R1C1 formula format:

Sub fillsheet()
Dim ows As Worksheet
Dim tws As Worksheet
Dim rng As Range

Set ows = Worksheets("Sheet1")
Set tws = Worksheets("Sheet2")

Set rng = ows.UsedRange

tws.Range(rng.Address()).FormulaR1C1 = "='" & ows.Name & "'!RC"
End Sub

1

solved Macro in Excel to Copy a Worksheet (by referencing every cell)