+ Reply to Thread
Results 1 to 3 of 3

How to extract text before & after a space from the right?

  1. #1
    Registered User
    Join Date
    07-19-2017
    Location
    Australia
    MS-Off Ver
    365
    Posts
    1

    How to extract text before & after a space from the right?

    I have the following text in a cell:

    Cell A1: PP TO JOHN F MADIGAN 300.00 17,550.72
    Cell A2: PP TO J & K MADIGAN 3,400.00 4,150.72
    Cell A3: PP TO K L & D C MADIGAN 21,350.00 1,621.21

    I want a formula to extract the above into these
    Cell B1: 300.00
    Cell B2: 3,400.00
    Cell B3: 21,350.00

    Cheers.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to extract text before & after a space from the right?

    If you want it literally returned exactly as it appears as a text string..
    Try
    =TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)*LEN(A1),LEN(A1)))

    If you want that returned as an actual numeric value (3400 instead of 3,400.00)
    =MID(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)*LEN(A1),LEN(A1))+0
    You can then use cell formatting to show the decimals.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to extract text before & after a space from the right?

    Enter in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 PP TO JOHN F MADIGAN 300.00 17,550.72 300.00
    2 PP TO J & K MADIGAN 3,400.00 4,150.72 3400.00
    3 PP TO K L & D C MADIGAN 21,350.00 1,621.21 21350.00
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] Extract word after specifying blank space
    By Karnik in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-08-2016, 03:31 AM
  2. parsing text return space to space
    By dosmastr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2015, 12:09 AM
  3. [SOLVED] Extract all text before Final space in cell
    By jomili in forum Excel General
    Replies: 3
    Last Post: 07-22-2013, 12:55 PM
  4. Extract text between # and space
    By bp2010 in forum Excel General
    Replies: 3
    Last Post: 12-21-2010, 07:48 PM
  5. Extract text from string after , before a space
    By Dulanic in forum Excel General
    Replies: 1
    Last Post: 05-24-2010, 08:20 AM
  6. Extract text with space
    By maxthebear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2009, 08:01 PM
  7. Extract data after space
    By lmohaxx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-16-2008, 09:40 PM

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