+ Reply to Thread
Results 1 to 6 of 6

Extracting Multiple Text from a Single Cell

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Extracting Multiple Text from a Single Cell

    I am trying to pull out from this string of text anything between the "~1c".

    ~1cE~1c****************~1c101~1c100~1c~1c~1c~1c~1c~1c~1c~1c22~1c01424~1c00000~1c0007435~1c0007435~1c079~1c0003944~1c0002239~1c000000~1c0000883~1c070~1c0002000~1c0005215~1c000398~1c0000645~1c070~1c0002000~1c0005215~1c000398~1c0000645~1c081~1c0001000~1c0020400~1c000000~1c0002040~1c) N(7,ABSMLT1)

    Is there an easy way to convert this text to look like this?:
    E
    ****************
    101
    100
    c22
    c01424
    1c00000
    -and so on-

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Extracting Multiple Text from a Single Cell

    With data in A1

    in A2 and copy down

    =TRIM(MID(SUBSTITUTE($A$1,"~1c",REPT(" ",99)),(ROWS($1:1)-1)*99+1,99))

    you will get blank cells where there are multiple "~1c" entries
    Last edited by JohnTopley; 06-28-2017 at 02:59 PM. Reason: Changed 50 to 99

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Extracting Multiple Text from a Single Cell

    Worked like a charm! Thank you!!

  4. #4
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Extracting Multiple Text from a Single Cell

    Hi JohnTopley - Could you explain why you chose to use 99? The formula works up to a certain degree. Then it breaks one of the numbers in half. I've highlighted where it breaks in yellow and changed the font to red in the string.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Extracting Multiple Text from a Single Cell

    Try

    =TRIM(MID(SUBSTITUTE($A$1,"~1c",REPT(" ",256)),(ROWS($1:1)-1)*256+1,256))

    which hopefully should cater for your sample.

  6. #6
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Extracting Multiple Text from a Single Cell

    Thanks so much, that did fix it. Could you tell me why you chose 256? I'm trying to get an understanding of how to use the formula rather than just using it.

+ 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] Macro for extracting data from multiple sheets if cell has text
    By plasma33 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-11-2016, 08:15 PM
  2. [SOLVED] Extracting Data from Single Text String
    By aharb in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-18-2015, 12:17 PM
  3. Replies: 0
    Last Post: 09-13-2015, 04:43 PM
  4. Formula for extracting text values from single cell
    By viber52 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-27-2015, 12:42 PM
  5. [SOLVED] insert multiple text box into one single cell
    By elizevonne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2015, 08:10 AM
  6. [SOLVED] Looking for a single text value and returning 1 or multiple text values in one cell
    By cramnij in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-07-2014, 04:59 AM
  7. [SOLVED] Enhancing formula for extracting text from a single cell
    By Mizuki in forum Excel General
    Replies: 2
    Last Post: 07-10-2012, 12:46 AM

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