Hi,
To hide rows then put a button on your worksheet and attach the code below. To unhide the rows attach another button and change the TRUE in bold to FALSE and attach that code.
Dim LastRow As Long, x As Long
LastRow = Cells(Cells.Rows.Count, "D").End(xlUp).Row
For x = 1 To LastRow
If UCase(Cells(x, "D")) = "NOT APPLICABLE" Then
Rows(x).Hidden = True
End If
Next