Edit Text Strings

  • INSERT INTO default_en_listingsdb VALUES('1','1','Example Listing','2003-07-01','This is an example listing!','Blah!','2002-07-01','2006-08-10 16:18:18','29','no','no','no');



    I want to remove everything before the (
    I have alot of cells in a column like this.
    Wasn't sure how to do it, I figured I could find an old post on trims but I didnt find anything that helped me.

  • Re: Remove Text Before The (


    Hi


    Here's a couple of options


    =SUBSTITUTE(A1,LEFT(A1,FIND("(",A1)-1),"")


    =RIGHT(A1,LEN(A1)-FIND("(",A1)+1)



    Tony

  • Re: Edit Text Strings


    With VBA:


    Code
    dim strString  as string 
    dim intPos      as integer 
    
    
    strString = "INSERT INTO default_en_listingsdb VALUES('1','1','Example Listing','2003-07-01','This is an example listing!','Blah!','2002-07-01','2006-08-10 16:18:18','29','no','no','no');"
    
    
    'Search pos (
    intpos = InStr(1, strstring, "(")
    strString = Mid(strString, intPos + 1)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!