Hi all,
I have the following VBA code to loop through the tab and look for a certain value at Range("R1"), if "Y", I like to copy Range("R3") to Range("B5") of the worksheet." Overview".
However, it doesn't copy to Overview tab. Please advice. Thanks!
I have the following VBA code to loop through the tab and look for a certain value at Range("R1"), if "Y", I like to copy Range("R3") to Range("B5") of the worksheet." Overview".
However, it doesn't copy to Overview tab. Please advice. Thanks!
VBA Code:
Dim ws As Worksheet
Dim Summary As Worksheet
Set Summary = ThisWorkbook.Sheets("Overview")
For Each ws In ThisWorkbook.Sheets
If Not ws.Name = "Overview" Then
If ws.Range("R1").Value = "Y" Then
Range("M3").Copy Destination:=Summary.Range("B5" & Rows.Count).End(xlUp).Offset(1, 0)
End If
End If
Next ws
End Sub