Hello,
The code below used to work, but it was pulling from data that was set up as such:
Operator Name = "J Doe"
The quotes were since removed and the raw data now looks like this:
Operator Name = J Doe
How do I adjust this code below to pull correctly again?
Thank you!
blnSkip = False
strFindWhat = "Operator Name"
openPos = InStr(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, """")
If blnSkip = False Then
closePos = InStrRev(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, """")
strOperatorName = Mid(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, openPos + 1, closePos - openPos - 1)
End If
The code below used to work, but it was pulling from data that was set up as such:
Operator Name = "J Doe"
The quotes were since removed and the raw data now looks like this:
Operator Name = J Doe
How do I adjust this code below to pull correctly again?
Thank you!
blnSkip = False
strFindWhat = "Operator Name"
openPos = InStr(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, """")
If blnSkip = False Then
closePos = InStrRev(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, """")
strOperatorName = Mid(.Range("A:A").Find(What:=strFindWhat, LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows).Value, openPos + 1, closePos - openPos - 1)
End If