Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a value only till particualr value?

Status
Not open for further replies.
Apr 18, 2007
209
US
Friends I need help on a formula

I have field with values like
opslib.vip.smf.ebay.com or opslib.vip.smf.ebay.com-8091 ,etc

I want to capture the value till only .com , is there a way to do it? right now I am already using formula to eliminate few values

stringvar str1:= {Sheet1_.pool_shrt_nm};

numbervar x:= InStr ( str1, "808");
str1 := if x = 0 then str1 else replace(str1, mid(str1, x-1, 5), "");

str1 := replace( str1, "-iapp", "-app");
str1 := replace( str1, "_iapp", "_app")

Thanks a ton
Tob
 
Try:

extractstring({Sheet1_.pool_shrt_nm},"",".com")

-LB
 
LB it works like charm whenver it has .com it would grab only till .com or else returing the original value. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top