gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
Knowing that if I wanted to Paste Formulas and Formats that it’s the equivalent to a simple paste, but that doesn’t see to work if I try to modify what I am doing with this code.
I changed to .Cells(101, e).Paste but it doesn’t like this part of the code.
How do I change the following to paste all? Or do I need to run through this and Pasteformat and then PasteFormulas?
Dim e As Long
Dim LastCol As Long
With Sheets("Cash Flow")
LastCol = .Cells(1, .Columns.Count).End(xlUp).Column
End With
With Sheets("Cash Flow")
.Range("D101:D106").Copy
For e = 5 To LastCol
If Len(.Cells(6, e).Value) <> 0 Then
.Cells(101, e).PasteSpecial Paste:=xlPasteFormulas
End If
Next e
End With
I changed to .Cells(101, e).Paste but it doesn’t like this part of the code.
How do I change the following to paste all? Or do I need to run through this and Pasteformat and then PasteFormulas?
Dim e As Long
Dim LastCol As Long
With Sheets("Cash Flow")
LastCol = .Cells(1, .Columns.Count).End(xlUp).Column
End With
With Sheets("Cash Flow")
.Range("D101:D106").Copy
For e = 5 To LastCol
If Len(.Cells(6, e).Value) <> 0 Then
.Cells(101, e).PasteSpecial Paste:=xlPasteFormulas
End If
Next e
End With