PDA

View Full Version : Help w/Offset Paste



Toasty
01-10-2018, 12:00 AM
Hi, pretty sure I'm over looking the obvious. Just need to have the copied range paste in the first empty cell to the right of D19.
Sub AddColumn()
Application.ScreenUpdating = False
Sheets("Output").Select
Dim Count As Integer
Count = 0

If Range("D19").Offset(0, Count) = "" Then
Sheets("Temp").Range("E14:E26").Copy
Sheets("Output").Range("D19").Offset(0, Count).PasteSpecial (xlPasteValues)
Count = Count + 1
End If


Application.ScreenUpdating = True
End Sub

offthelip
01-10-2018, 04:44 AM
You forgot to put a loop in!!

SamT
01-10-2018, 08:09 AM
Sub AddColumn()
Application.ScreenUpdating = False

Sheets("Temp").Range("E14:E26").Copy
Sheets("Output").Range("D19").End(xlToRight).Offset(0, 1).PasteSpecial (xlPasteValues)

Application.ScreenUpdating = True
End Sub