Hi. I hope you all can help me. I have this code that will copy cells while skipping blanks, but it drops everything into column A. I need it to go across multiple columns.
I need it to copy a larger range.
I have a range (CZ9:DD34 & CZ363:DD365) on a worksheet called K-5 (5 Week FV Bar).
I want it to copy the cells but skip blanks. I want it to copy to this range (A8:E33) on worksheet K-5 (5 Week FV Bar) PR.
My macro is below, but when I run it, it gives me run-time error of 13, "Type mismatch".
Please help. Thanks in advance.
Here's an example of what I need.
table.jpg
Sub Copy_Recipes_PRW1Monday()
Dim cell As Range, r As Long
r = 8
Application.ScreenUpdating = False
Sheets("K-5 (5 Week FV Bar) PR").Range("A8:E33").ClearContents
For Each cell In Sheets("K-5 (5 Week FV Bar)").Range("CZ9:DD34, CZ363:DD365")
If Len(cell) > 0 Then
Sheets("K-5 (5 Week FV Bar) PR").Range("A" & r).Value = cell.Value
r = r + 1
End If
Next cell
Application.ScreenUpdating = True
End Sub
Bookmarks