This is my code, but it's not doing what I was planned to:
In the first part of the code I copy the data from another sheet as the original (Kit Inventory List) may not be changed. The purpose of the second sheet (Empty Loc Che is to only show the rows which have missing data in column B.
Private Sub CommandButton2_Click()
'Export empty locators
ThisWorkbook.Worksheets("Empty Loc Check").Cells.Clear
Dim OutputLoc As Range
Set OutputLoc = ThisWorkbook.Worksheets("Empty Loc Check").Range("A:B")
Sheets("Kit Inventory List").Range("A:B").Copy OutputLoc
Sheets("Empty Loc Check").Rows("1").EntireRow.Delete
Dim Firstrow As Long
Dim Lastrow As Long
Dim Lrow As Long
Dim CalcMode As Long
Dim ViewMode As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
With Worksheets("Empty Loc Check")
.Select
Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
For Lrow = Lastrow To Firstrow Step -1
With .Cells(Lrow, "A")
If Not IsError(.Value) Then
If .Value = NotEmpty Then .EntireRow.Delete
End If
End With
Next Lrow
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End Sub