+ Reply to Thread
Results 1 to 6 of 6

Trim formula

Hybrid View

stemcell1 Trim formula 10-23-2008, 10:53 AM
Ron Coderre Parsing text 10-23-2008, 11:08 AM
stemcell1 Thanks Ron! That was very... 10-23-2008, 11:17 AM
martindwilson well for first part ... 10-23-2008, 12:23 PM
Ron Coderre Parsing text with a delimiter 10-23-2008, 12:39 PM
stemcell1 That is probably the longest... 10-23-2008, 12:39 PM
  1. #1
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Parsing text with a delimiter

    I didn't realize that you wanted all 3 sections if there are 2 colons

    With
    G5: (the text to parse....eg AVM:Pioneer Clinic:Dave McAfee)

    This formula returns the part after the LAST colon
    J5: =MID(G5,FIND(CHAR(8),SUBSTITUTE(G5,":",CHAR(8),
    LEN(G5)-LEN(SUBSTITUTE(G5,":",""))))+1,255)
    This formula returns the AVM part....only if there are 2 colons
    otherwise it is blank ("")
    H5: =IF(LEN(G5)-LEN(SUBSTITUTE(G5,":",""))=2,LEFT(G5,FIND(":",G5)-1),"")
    This formula returns the section BEFORE the last colon
    (EDITED to correct a formula error)
    I5: =MID(SUBSTITUTE(G5,":"&J5,""),LEN(H5)+1+(LEN(H5)>0),255)
    In the above example, these values are returned:
    AVM
    Pioneer Clinic
    Dave McAfee

    Does that help?
    Last edited by Ron Coderre; 10-23-2008 at 12:47 PM. Reason: edit the formula for cell I5
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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