Sub BrokerFilter()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets("Std").Copy
With ActiveSheet.UsedRange
.Value = .Value
End With
Sheets("Std").Select
Range("$A$3:$P$1004").AutoFilter Field:=16, Criteria1:="=True" _
, Operator:=xlOr, Criteria2:="="
Set LastCell = Cells(Cells.Find(what:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row, _
Cells.Find(what:="*", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Column)
Set FirstCell = Cells(Cells.Find(what:="*", After:=LastCell, SearchOrder:=xlRows, _
SearchDirection:=xlNext, LookIn:=xlValues).Row, _
Cells.Find(what:="*", After:=LastCell, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, LookIn:=xlValues).Column)
Application.DisplayAlerts = False
ActiveSheet.UsedRange.Offset(3, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
Application.DisplayAlerts = True
ActiveSheet.Range("$A$3:$P$1004").AutoFilter Field:=16
Columns("P:P").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Delete Shift:=xlToLeft
Range("A4").Select
'Delete blank colums
Dim MyRange As Range
Dim iCounter As Long
'Step 2: Define the target Range.
Set MyRange = ActiveSheet.UsedRange
'Step 3: Start reverse looping through the range.
For iCounter = MyRange.Columns.Count To 1 Step -1
'Step 4: If entire column is empty then delete it.
If Application.CountA(Intersect(MyRange.Offset(3), Columns(iCounter))) = 0 Then
Columns(iCounter).Delete
End If
'Step 5: Increment the counter down
Next iCounter
'Copy to Clipboard
If Not Range("E4:F1004").Find(what:="RQD", LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox ("Review MSDS to determine if Positive, or Negative Certificate is required")
End If
If Not Range("E4:F1004").Find(what:="P", LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox ("Complete TSCA Certificate")
End If
If Not Range("E4:F1004").Find(what:="N", LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox ("Complete TSCA Certificate")
End If
If Not Range("E4:F1004").Find(what:="RH1810212", LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox ("Complete FDA-2877 Form")
End If
If Not Range("E4:O1004").Find(what:="M2 Rqd", LookIn:=xlValues, lookAt:=xlWhole, MatchCase:=True) Is Nothing Then
MsgBox ("Review measurements to determine square meters")
End If
Dim oneCell As Range
For Each oneCell In Range("D4:P1004")
With oneCell
If oneCell.DisplayFormat.Interior.Color = vbRed Then
MsgBox ("Complete missing manufacturer's information")
End If
End With
Next oneCell
Worksheets("Std").UsedRange
Worksheets("Std").UsedRange.Select
Selection.Copy
Application.DisplayAlerts = False
Application.ScreenUpdating = False
ActiveWorkbook.Close
Windows("Trade Compliance Database Tool.xlsb").Activate
Sheets("Master Query").Select
Range("A4").Select
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub