+ Reply to Thread
Results 1 to 4 of 4

Find 2 characters delete single space before and all chacters after

  1. #1
    Registered User
    Join Date
    01-18-2014
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    4

    Find 2 characters delete single space before and all chacters after

    The example info below are contained in one single cell each in the same column and I need to find BG and then remove the single space in front of BG and remove all characters after BG

    7 SD1 Ferguson Acocks 6 BG1953919 BLX CJ210 1360 3 14 27 1907.740 $0.00 $75.00 $100.00 $175.00
    1603 BU518 Sarg Middle 28 CS16437 DK F737 1280 3 1 41 1902.56 $1.00 $56.00 $101.00 $155.00
    1044 BU51 James Leigh 85 BG8239175 CH X8160 1730 3 18 27 1902.71 $4.00 $55.00 $110.00 $135.00

    This would be the result:
    7 SD1 Ferguson Acocks 6BG
    1603 BU518 Sarg Middle 28 CS16437 DK F737 1280 3 1 41 1902.56 $1.00 $56.00 $101.00 $155.00
    1044 BU51 James Leigh 85BG

    Many thanks Ruth

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Find 2 characters delete single space before and all chacters after

    Try this: =IFERROR(TRIM(LEFT(A1,FIND(" BG",A1)))&"BG",A1)

  3. #3
    Registered User
    Join Date
    01-18-2014
    Location
    Portsmouth
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Find 2 characters delete single space before and all chacters after

    Thank you very much josephteh. Where do I set this post to solved?

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: Find 2 characters delete single space before and all chacters after

    You are welcome Ruth. At the top of your post #1 under Thread Tools.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find and Delete XX characters from Right
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-13-2017, 02:38 PM
  2. Find Characters After Space
    By TomBaty in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-27-2017, 12:04 PM
  3. Delete Characters Before Last Space In Text String [SOLVED]
    By alacey425 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2016, 11:30 PM
  4. [SOLVED] How to delete all cells in a single column if first 3 characters are ***
    By bonpara in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-28-2015, 01:38 AM
  5. [SOLVED] Find first space at 30 characters, then looking to the left
    By SimonDorfman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-16-2013, 04:07 PM
  6. Replies: 8
    Last Post: 02-14-2011, 10:58 AM
  7. Delete and Copy Chacters in a Cell
    By tallguy6354 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2009, 10:27 AM

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