Hi all
I was wondering if someone could help me with this conundrum.
I currently have a workbook with multiple pages and have this VBA working which looks for any dates that are more then 3 days out of the target completion time.
It populates the worksheet "Slowmovers", A column with the sheet name and B column with the order number. All works fine.
BUT
It Only finds the first field (sheet name and order number) regardless whether the order is open or closed. The issue is sometimes the order will have to go around the system again because of various reasons and appear twice on the worksheet.
How can I get it to report only the open order ie date is not entered in I column?
Hope this makes sense?
Thanks for any help.
I was wondering if someone could help me with this conundrum.
I currently have a workbook with multiple pages and have this VBA working which looks for any dates that are more then 3 days out of the target completion time.
It populates the worksheet "Slowmovers", A column with the sheet name and B column with the order number. All works fine.
BUT
It Only finds the first field (sheet name and order number) regardless whether the order is open or closed. The issue is sometimes the order will have to go around the system again because of various reasons and appear twice on the worksheet.
How can I get it to report only the open order ie date is not entered in I column?
Hope this makes sense?
Thanks for any help.
VBA Code:
Sub Slowmovers()
Dim ws As Worksheet
Dim Ary As Variant, Rws As Variant
Sheets("Slowmovers").Select
Range("A2:B100").Select
Selection.ClearContents
Range("A2").Select
For Each ws In Worksheets
Select Case ws.Name
Case "Phoenix", "Overview", "Dashboard", "Input", "Tracker", "Holiday List", "Log" 'sheets that should be ignored
Case Else
With ws.Range("B5:B" & ws.Range("L" & Rows.count).End(xlUp).Row)
Rws = Filter(ws.Evaluate(Replace("transpose(if((@>3)*(@<>""""),row(@)-min(row(@))+1,false))", "@", .Offset(, 10).Address)), False, False)
If UBound(Rws) >= 0 Then Ary = Application.Index(.Value, Application.Transpose(Rws), 1)
End With
If UBound(Rws) >= 0 Then
With Sheets("Slowmovers").Range("A" & Rows.count).End(xlUp).Offset(1)
.Resize(UBound(Ary)).Value = ws.Name
.Offset(, 1).Resize(UBound(Ary)).Value = Ary
End With
End If
End Select
Next ws
Range("D1").Value = Format(Now, "mm/dd/yyyy HH:mm:ss")
End Sub