Hello all. I have the following code that performs a row copy based on selected dates which is then pasted to another sheet as a report. I need to also perform the same copy from another sheet with the same structure so the All_Report contains the data from both sheets. The name of the other sheet to copy the information from is "Closed_Requests".
Case "All_Report"
If IsDate(.Cells(x, "C").Value) And .Cells(x, "C").Value <> "" And .Cells(x, "C").Value >= lodate And .Cells(x, "C").Value <= hidate Then
If RowsWithNumbers Is Nothing Then
Set RowsWithNumbers = .Cells(x, "C")
Else
Set RowsWithNumbers = Union(RowsWithNumbers, .Cells(x, "C"))
End If
End If
End If
I tried
Case "All_Report"
If IsDate(.Cells(x, "C").Value) And .Cells(x, "C").Value <> "" And .Cells(x, "C").Value >= lodate And .Cells(x, "C").Value <= hidate Then
If worksheets("Closed_Requests") IsDate(.Cells(x, "C").Value) And .Cells(x, "C").Value <> "" And .Cells(x, "C").Value >= lodate And .Cells(x, "C").Value <= hidate Then
If RowsWithNumbers Is Nothing Then
Set RowsWithNumbers = .Cells(x, "C")
Else
Set RowsWithNumbers = Union(RowsWithNumbers, .Cells(x, "C"))
End If
End If
End If
This gives me a compile error with the second 'IsDate' hilighted and stating "Expected: Then or GoTo"
Any help would be appreciated!!
Thanks,
Andrew
Bookmarks