Hello,
I am using the following code to copy an entire row when that row has data in column Y, and then paste that row into a different worksheet.
Sub CopyAndPaste()
Call CopyAndPasteSpecial
Application.ScreenUpdating = False
NR = 2
Dim cel As Range
With Sheets("Processor")
For Each cel In .Range("Y6:Y" & .Cells(.Rows.Count, "Y").End(xlUp).Row).SpecialCells(2)
cel.EntireRow.Copy
Sheets("Results").Range("A" & NR).PasteSpecial Paste:=xlPasteValues
NR = NR + 1
Next cel
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Because the data in column Y is generated via a formula, the first thing I'm doing is copying and pasting special as values.
Sub CopyAndPasteSpecial()
Sheets("Processor").Select
Range("Y6:Y27").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Does anyone know why calling this second macro would cause the first macro to return every row (even those without data in column Y)?
THANK YOU!
Bookmarks