Hi,
I need help to modify this macro:
I need to pull data from sheet1, sheet2, sheet3 and sheet4 to Master.
Actual code pull data from sheet1 is row is #0.
RowsA to d:
Sub CopyRows()
Application.ScreenUpdating = False
Dim srcWS As Worksheet, desWS As Worksheet, rng As Range
Set srcWS = Sheets("Sheet1")
Set desWS = Sheets("Master")
For Each rng In Range("A2", Range("A" & Rows.Count).End(xlUp))
If WorksheetFunction.CountIf(Range("B" & rng.Row).Resize(, 3), "0") <> 3 Then
With desWS
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Resize(, 4).Value = srcWS.Range("A" & rng.Row).Resize(, 4).Value
End With
End If
Next rng
Application.ScreenUpdating = True
End Sub
I need help to modify this macro:
I need to pull data from sheet1, sheet2, sheet3 and sheet4 to Master.
Actual code pull data from sheet1 is row is #0.
RowsA to d:
Sub CopyRows()
Application.ScreenUpdating = False
Dim srcWS As Worksheet, desWS As Worksheet, rng As Range
Set srcWS = Sheets("Sheet1")
Set desWS = Sheets("Master")
For Each rng In Range("A2", Range("A" & Rows.Count).End(xlUp))
If WorksheetFunction.CountIf(Range("B" & rng.Row).Resize(, 3), "0") <> 3 Then
With desWS
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Resize(, 4).Value = srcWS.Range("A" & rng.Row).Resize(, 4).Value
End With
End If
Next rng
Application.ScreenUpdating = True
End Sub