HI guys.
I would like to copy rows from multiple worksheets (Jan to Dec) that contain certain text - WON, PENDING, LOST - When a VBA Button is pressed on another Worksheet the information is copied to VIEW. So far i can copy from only one worksheet at a time.
CODE so far
Sub CopyWONtoView()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Jan")
Set Target = ActiveWorkbook.Worksheets("VIEW")
Target.Range("$A$4:$R$50").Clear
j = 4 ' Start copying to row 4 in target sheet
For Each c In Source.Range("A4:A95")
If c = "WON" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
Worksheets("VIEW").Activate
End Sub
Any and all help would be much appreciated.
I would like to copy rows from multiple worksheets (Jan to Dec) that contain certain text - WON, PENDING, LOST - When a VBA Button is pressed on another Worksheet the information is copied to VIEW. So far i can copy from only one worksheet at a time.
CODE so far
Sub CopyWONtoView()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Jan")
Set Target = ActiveWorkbook.Worksheets("VIEW")
Target.Range("$A$4:$R$50").Clear
j = 4 ' Start copying to row 4 in target sheet
For Each c In Source.Range("A4:A95")
If c = "WON" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
Worksheets("VIEW").Activate
End Sub
Any and all help would be much appreciated.