Hi there I have this code which only copy-paste data from sheet 1 one to sheet 2.
Sub CopyPasteCumUpdate()
Dim rng As Range, inp As Range
'to remove 0 values that may be a result of a formula or direct entry.
Set rng = Nothing
Set inp = Selection
inp.Interior.ColorIndex = 37
On Error Resume Next
Set rng = Application.InputBox("Copy to", Type:=8)
On Error GoTo 0
If TypeName(rng) <> "Range" Then
MsgBox "Cancelled", vbInformation
Exit Sub
Else
rng.Parent.Activate
rng.Select
inp.Copy
Worksheets("Sheet2").Paste Link:=True
Application.CutCopyMode = 0
End If
End Sub
Is it possible to input data and paste it to any other sheet without having to hard code?
From your comment that is easy. Just change this part:
With this:
Edit: This is to paste the link in the range the user selected.