JazzSP8
Well-known Member
- Joined
- Sep 30, 2005
- Messages
- 1,233
- Office Version
- 365
- Platform
- Windows
Hey All
I've got a perfectly fine and working Macro but I need to tweak it and can't work it out :-/
I need to be able to Copy and Paste a range of cells from one worksheet to the bottom of another in the same workbook, that's what this code does;
The thing is that some of the cells it copies have background colours and I need those copying as well.
Is there a simple way I can do with that code?
Something like ".PasteSpecial xlPasteFormats" ?
Brain freeze on this one
I've got a perfectly fine and working Macro but I need to tweak it and can't work it out :-/
I need to be able to Copy and Paste a range of cells from one worksheet to the bottom of another in the same workbook, that's what this code does;
Code:
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
For y = 1 To LastCol
If Cells(1, y).Value = "Products" Then
Range(Cells(2, y), Cells(NewLastRow, y)).Copy Sheets("Final").Range("B" & Rows.Count).End(xlUp).Offset(1, 0)
FoundPr = True
End If
If Cells(1, y).Value = "ID" Then
Range(Cells(2, y), Cells(NewLastRow, y)).Copy Sheets("Final").Range("D" & Rows.Count).End(xlUp).Offset(1, 0)
FoundID = True
End If
Next y
The thing is that some of the cells it copies have background colours and I need those copying as well.
Is there a simple way I can do with that code?
Something like ".PasteSpecial xlPasteFormats" ?
Brain freeze on this one
Last edited: