Trying to make a macro that will loop through a table to fill cells on another sheet. When the code gets to merged cells, it errors. I tried paste special but it does not work.
How do you paste to a merged cell in this instance?
Receipt Macro
Dim cell As Range
For Each cell In Range("MEMOLog[Delivered Date]")
If cell.Value = "x" Then
cell.Offset(0, 2).Copy Destination:=(Sheets("test").Range("B8"))
cell.Offset(0, 1).Copy Destination:=(Sheets("test").Range("D8"))
cell.Offset(0, 3).Copy Destination:=(Sheets("test").Range("D9"))
cell.Offset(0, 7).Copy Destination:=(Sheets("test").Range("B10"))
'Paste special not working
cell.Offset(0, 4).Copy Sheets("test").Range("A13").Pastespecial Paste = xlPasteFormulas
cell.Offset(0, 5).Copy Destination:=(Sheets("test").Range("C13"))
cell.Offset(0, 6).Copy Destination:=(Sheets("test").Range("D14"))
Sheets("test").PrintOut
How do you paste to a merged cell in this instance?
Receipt Macro
Dim cell As Range
For Each cell In Range("MEMOLog[Delivered Date]")
If cell.Value = "x" Then
cell.Offset(0, 2).Copy Destination:=(Sheets("test").Range("B8"))
cell.Offset(0, 1).Copy Destination:=(Sheets("test").Range("D8"))
cell.Offset(0, 3).Copy Destination:=(Sheets("test").Range("D9"))
cell.Offset(0, 7).Copy Destination:=(Sheets("test").Range("B10"))
'Paste special not working
cell.Offset(0, 4).Copy Sheets("test").Range("A13").Pastespecial Paste = xlPasteFormulas
cell.Offset(0, 5).Copy Destination:=(Sheets("test").Range("C13"))
cell.Offset(0, 6).Copy Destination:=(Sheets("test").Range("D14"))
Sheets("test").PrintOut