+ Reply to Thread
Results 1 to 3 of 3

Removing punctuation in a formula

  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    2

    Removing punctuation in a formula

    Hi all! I'm new and need help, so thanks very much for allowing me to post!

    I have a database called a "Land Sales Database" (LSD) in Excel, and a separate file to achive all files. I have the following formula in the archive file:

    =UPPER(IF(+C7="","",VLOOKUP(+C7,'G:\Registration\Land Sales\Landsales\MANUAL\System\[Land Sales v2006.xls]Data'!$A:$B,2)))

    The formula returns a name result from LSD, ie:

    JOE B. ROWN, "WAGGA", 13 TREVOR ST., BRISBANE

    Is there a way to modify the above formula to remove ALL punctuation, so the desired result would be:

    JOE B ROWN WAGGA 13 TREVOR ST BRISBANE

    Any ideas?

    Regards
    Chris

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Removing punctuation in a formula

    use a few substitutes (note you need 4 " , """" if substituting " s)
    =trim(substitute(substitute(substitute(upper(vlookup(a1,c1:d3,2,false)),"""",""),".",""),",",""))
    Last edited by martindwilson; 06-17-2009 at 08:43 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Removing punctuation in a formula

    I got it, but my head exploded. So many parentheses ...! Thanks for that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1