Extracting text before a known character
just adding to charle's code, if you don't want the underscore
var1 = Left(str1, InStr(1, str1, "_") - 1)
--
Gary
"Charles Chickering" wrote in
message ...
Var1 = Left(str1, InStr(1,str1,"_"))
--
Charles Chickering
"A good example is twice the value of good advice."
"Barb Reinhardt" wrote:
I'd like to extract all text in a string that appears before an underbar.
How would I do this programmatically?
Thanks
|