horizonflame
Board Regular
- Joined
- Sep 27, 2018
- Messages
- 186
- Office Version
- 2013
Hi All
I would like to copy all non-blank cells in range R5:X7000 into the adjacent cell in Range K5:Q7000 as paste values. Essentially any non-blank cells will paste as a value in same row but 7 columns to the left. I have what I think is a good piece of code but need some help how to edit it to my cell range and paste area.
Many thanks
I would like to copy all non-blank cells in range R5:X7000 into the adjacent cell in Range K5:Q7000 as paste values. Essentially any non-blank cells will paste as a value in same row but 7 columns to the left. I have what I think is a good piece of code but need some help how to edit it to my cell range and paste area.
Code:
Sub CopyData() Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("K5:Q7000")
If c.Offset(0, 1) <> "" Then NEED TO CHANGE THIS LINE
c.Copy
Cells(Rows.Count, "H").End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues) NEED TO CHANGE THIS LINE
Application.CutCopyMode = False
End If
Next c
Application.ScreenUpdating = False
End Sub
Many thanks
Last edited: