Hi all
I already have a vba that searches through multiple sheets in a workbook and finds orders that are over three days old on any single sheet then reports them on a summary sheet.
The problem is I can not get it to report when the order appears multiple times on the same tab?
Please could some one advise if this is possible to add a script into my existing and how I could do this? Hope the above makes sense and many thanks.
I already have a vba that searches through multiple sheets in a workbook and finds orders that are over three days old on any single sheet then reports them on a summary sheet.
The problem is I can not get it to report when the order appears multiple times on the same tab?
Please could some one advise if this is possible to add a script into my existing and how I could do this? Hope the above makes sense and many thanks.
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