Sub SearchENC() ' Entries Not Completed
NN = Range("NextTN").Value
AT = Range("AdminType").Text
UN = Range("AdminUnit").Text
z = 2
For x = 1 To NN
If Cells(x, 8) = "" And Cells(x, 5) = AT And Left(Cells(x, 4), 1) = UN Then
For y = 1 To 9
Cells(z, y + 26) = Cells(x, y)
Next y
z = z + 1
End If
Next x
End Sub
UN = Range("AdminUnit").Text is input as 0, 1, 2, or 3. If it is Zero 0, then I want Left(Cells(x, 4), 1) = UN to be true for 1, 2 or 3. I tried wild cards but must not have it right.
How can I make UN = to a wildcard char accepting 1 2 or 3?
UN = "?" ...
Chas
NN = Range("NextTN").Value
AT = Range("AdminType").Text
UN = Range("AdminUnit").Text
z = 2
For x = 1 To NN
If Cells(x, 8) = "" And Cells(x, 5) = AT And Left(Cells(x, 4), 1) = UN Then
For y = 1 To 9
Cells(z, y + 26) = Cells(x, y)
Next y
z = z + 1
End If
Next x
End Sub
UN = Range("AdminUnit").Text is input as 0, 1, 2, or 3. If it is Zero 0, then I want Left(Cells(x, 4), 1) = UN to be true for 1, 2 or 3. I tried wild cards but must not have it right.
How can I make UN = to a wildcard char accepting 1 2 or 3?
UN = "?" ...
Chas