L
L. Howard
I seem to have fixed it with the change in this line
'If Left(myArr(i, 1), 1) = "P-" Then
If Left(myArr(i, 1), 2) = "P-" Then
I would still like your opinion, however.
myArr = .Range("A1:A" & LRow)
myCt = WorksheetFunction.CountIf(.Range("A1:A" & LRow), "P-" & "*")
For i = LBound(myArr) To UBound(myArr)
ReDim Preserve arrOut(myCt - 1, 1)
'If Left(myArr(i, 1), 1) = "P-" Then
If Left(myArr(i, 1), 2) = "P-" Then
arrOut(j, 0) = myArr(i, 1)
j = j + 1
Else
arrOut(j - 1, 1) = myArr(i, 1)
End If
Next
Howard
'If Left(myArr(i, 1), 1) = "P-" Then
If Left(myArr(i, 1), 2) = "P-" Then
I would still like your opinion, however.
myArr = .Range("A1:A" & LRow)
myCt = WorksheetFunction.CountIf(.Range("A1:A" & LRow), "P-" & "*")
For i = LBound(myArr) To UBound(myArr)
ReDim Preserve arrOut(myCt - 1, 1)
'If Left(myArr(i, 1), 1) = "P-" Then
If Left(myArr(i, 1), 2) = "P-" Then
arrOut(j, 0) = myArr(i, 1)
j = j + 1
Else
arrOut(j - 1, 1) = myArr(i, 1)
End If
Next
Howard