daseffects
Technical User
Sorry if this post comes up twice.
I'm almost there with the below - what I ideally need is that for each increase in the value of ("c3"
that the data is pasted some number of columns over from the previous - I could type it all out but there must be an easier way
eg if value = 1 paste in E5, If 2 paste in H5, If 3 past in K5.
Sub copy_data()
Application.ScreenUpdating = False
Sheets("sheet1"
.Range("E6:F7"
.Select
Selection.Copy
If Range("C3"
= 1 Then
Sheets("Sheet2"
.Select
Range("E5"
.PasteSpecial (xlPasteValues)
Application.CutCopyMode = False
Else
Sheets("Sheet2"
.Select
Range("H5"
.PasteSpecial (xlPasteValues)
Application.CutCopyMode = False
End If
Sheets("sheet1"
.Select
Application.ScreenUpdating = True
End Sub
Thanks
I'm almost there with the below - what I ideally need is that for each increase in the value of ("c3"
eg if value = 1 paste in E5, If 2 paste in H5, If 3 past in K5.
Sub copy_data()
Application.ScreenUpdating = False
Sheets("sheet1"
Selection.Copy
If Range("C3"
Sheets("Sheet2"
Range("E5"
Application.CutCopyMode = False
Else
Sheets("Sheet2"
Range("H5"
Application.CutCopyMode = False
End If
Sheets("sheet1"
Application.ScreenUpdating = True
End Sub
Thanks