+ Reply to Thread
Results 1 to 7 of 7

Formula Needed to Omit Characters

  1. #1
    Registered User
    Join Date
    07-23-2005
    Posts
    23

    Formula Needed to Omit Characters

    Is there a formula that would recognize and omit specific characters within a field?

    Example:

    Data Field has the following 9 characters "R0502AA01".

    Only the following 7 characters: "R0502--01" should be picked up or recognized.

    What formula will pick up the 1st-5th and the 8th-9th characters and bypass the 6th & 7th characters?

    Addie

  2. #2
    Bernard Liengme
    Guest

    Re: Formula Needed to Omit Characters

    No sure what is meant by 'recognized'
    =LEFT(A1,5)
    =RIGHT(A1,2)
    =MID(A1,1,5)
    =SUBSTITUTE(A1,"AA","--")
    Any help?
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "addie" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a formula that would recognize and omit specific characters
    > within a field?
    >
    > Example:
    >
    > Data Field has the following 9 characters "R0502AA01".
    >
    > Only the following 7 characters: "R0502--01" should be picked up or
    > recognized.
    >
    > What formula will pick up the 1st-5th and the 8th-9th characters and
    > bypass the 6th & 7th characters?
    >
    > Addie
    >
    >
    > --
    > addie
    > ------------------------------------------------------------------------
    > addie's Profile:
    > http://www.excelforum.com/member.php...o&userid=25526
    > View this thread: http://www.excelforum.com/showthread...hreadid=513674
    >




  3. #3
    Bernard Liengme
    Guest

    Re: Formula Needed to Omit Characters

    And you could experiment with Data | Text to Columns
    best wishes
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "addie" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a formula that would recognize and omit specific characters
    > within a field?
    >
    > Example:
    >
    > Data Field has the following 9 characters "R0502AA01".
    >
    > Only the following 7 characters: "R0502--01" should be picked up or
    > recognized.
    >
    > What formula will pick up the 1st-5th and the 8th-9th characters and
    > bypass the 6th & 7th characters?
    >
    > Addie
    >
    >
    > --
    > addie
    > ------------------------------------------------------------------------
    > addie's Profile:
    > http://www.excelforum.com/member.php...o&userid=25526
    > View this thread: http://www.excelforum.com/showthread...hreadid=513674
    >




  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Addie,

    As long as your data is always in the same format (9 characters with the 6th & 7th being the data to omit),

    =SUBSTITUTE(A1,MID(A1,6,2),"")

    HTH

    Steve

  5. #5
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Another option, if your numbers are inconsitently formatted where some have 1 letter in the 6th position, 2 letters in 6th & 7th or no letters then try,

    =CHOOSE(LEN(A1)-6,A1,SUBSTITUTE(A1,MID(A1,6,1),""),SUBSTITUTE(A1,MID(A1,6,2),""))

    This only works if the smallest number of characters you'll have is 7.

    HTH

    Steve

  6. #6
    Registered User
    Join Date
    07-23-2005
    Posts
    23

    Smile It Worked

    Steve,

    Thanks. You were a great help!

    Addie

  7. #7
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Glad it was what you needed.

    Steve

+ 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