I currently have a listbox which allows me to look through all the records in my data table. The code for that is below
However now I want to add the criteria to change the range. So that rows are only included where the corresponding cell in column M = "No"
And I'm not sure how to do this, so any help would be appreciated, thanks
Code:
Dim lngLastRow As Long
lngLastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
If lngLastRow <> 3 Then
cboID.List = Worksheets("Sheet1").Range("A3:A" & lngLastRow).Value
Else
cboID.List = Worksheets("Sheet1").Range("A3:A4").Value
End If
However now I want to add the criteria to change the range. So that rows are only included where the corresponding cell in column M = "No"
And I'm not sure how to do this, so any help would be appreciated, thanks