Parsing text

C

cherman

I'm trying to parse the following text to pull out the course info, which is
to the right of "below:" within the text. We can say the text value is
assigned to a variable called CourseInfo. There is always at least 1 space
between "below:" and the begninning of the course info, so I might need to
use Trim to drop the spaces.

"Please rate yourself based on the class listed below: PLN0010: Sales
Orders"

Much thanks,
Clint
 
F

fredg

I'm trying to parse the following text to pull out the course info, which is
to the right of "below:" within the text. We can say the text value is
assigned to a variable called CourseInfo. There is always at least 1 space
between "below:" and the begninning of the course info, so I might need to
use Trim to drop the spaces.

"Please rate yourself based on the class listed below: PLN0010: Sales
Orders"

Much thanks,
Clint

So if I understand you correctly, from the sentence below, you wish to
return
"PLN0010: Sales Orders"

SomeVariable = Trim(Mid(SomeText,InStr(SomeText,"below:")+7))
 
C

cherman

Perfect! Thanks.


fredg said:
So if I understand you correctly, from the sentence below, you wish to
return
"PLN0010: Sales Orders"

SomeVariable = Trim(Mid(SomeText,InStr(SomeText,"below:")+7))
 
Top