+ Reply to Thread
Results 1 to 10 of 10

Help! Import text into Excel and split it into colunms based on the structure of the text

  1. #1
    Registered User
    Join Date
    09-11-2016
    Location
    Israel
    MS-Off Ver
    Home 2016
    Posts
    22

    Help! Import text into Excel and split it into colunms based on the structure of the text

    Hello guys,

    Need your help with something

    I would like to import lists into Excel and have a formula that could split the test based on the line structure. I'll explain:

    this is the structure:
    00:00 : Name - Unknown

    I would like to import a bunch of rows into column F for example. And then to write a formula on column A, B & C so that on
    Column A would contain 'Name'
    Column B would contain 'Unknown'
    Column C would contain '00:00'

    Another example:
    67:64 : My name here - Unknown text here (with some more info here)
    Column A would contain:
    My name here
    Column B would contain:
    Unknown text here (with some more info here)
    Column C would contain:
    67:64


    Thanks a lot guys!

    Regards,

  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
    28,206

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    Attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    Try
    Use Text to columns
    Use TAB and SPACE as delimiters
    Destination: $F$1
    SKIP unnecessary columns
    result in F1, G1, H1
    in A1: =TRIM(F1)
    in B1: TRIM(G1)
    in C1: TRIM(H1)

    maybe it will work for you else read #2
    Last edited by sandy666; 01-04-2017 at 07:14 AM.

  4. #4
    Registered User
    Join Date
    09-11-2016
    Location
    Israel
    MS-Off Ver
    Home 2016
    Posts
    22

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    please see attached excel file showing column F with the data and columns A B C.. I gave a manual example of how the result of the formula should be.

    Regards,
    Attached Files Attached Files

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    maybe it will work for you

    A1: =MID(F1,9,SEARCH("-",F1)-10)
    B1: =MID(F1,SEARCH("-",F1)+2,999)
    C1: =LEFT(F1,5)

    based on your example
    Last edited by sandy666; 01-04-2017 at 08:20 AM.

  6. #6
    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
    28,206

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    With data in D1

    in A1, B1 and C1 respectively

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),100,99))

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),199,99))

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),1,99))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-11-2016
    Location
    Israel
    MS-Off Ver
    Home 2016
    Posts
    22

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    Quote Originally Posted by JohnTopley View Post
    With data in D1

    in A1, B1 and C1 respectively

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),100,99))

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),199,99))

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($D1,":","|",2),"-","|"),"|",REPT(" ",99)),1,99))
    You sir made my day!!! Thanks so much!

  8. #8
    Registered User
    Join Date
    09-11-2016
    Location
    Israel
    MS-Off Ver
    Home 2016
    Posts
    22

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    Quote Originally Posted by sandy666 View Post
    maybe it will work for you

    A1: =MID(F1,9,SEARCH("-",F1)-10)
    B1: =MID(F1,SEARCH("-",F1)+2,999)
    C1: =LEFT(F1,5)

    based on your example
    Thank you as well friend for helping out

  9. #9
    Registered User
    Join Date
    09-11-2016
    Location
    Israel
    MS-Off Ver
    Home 2016
    Posts
    22

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    Quote Originally Posted by sandy666 View Post
    maybe it will work for you

    A1: =MID(F1,9,SEARCH("-",F1)-10)
    B1: =MID(F1,SEARCH("-",F1)+2,999)
    C1: =LEFT(F1,5)

    based on your example
    Thank you as well friend for helping out

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Help! Import text into Excel and split it into colunms based on the structure of the t

    You are welcome.
    If problem is resolved, add reputation star and mark thread as solved. Thank you

+ 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. how to structure formula to return an amt based on number and text
    By Iappreciate in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-24-2016, 09:51 AM
  2. Replies: 1
    Last Post: 12-17-2015, 03:35 AM
  3. Replies: 4
    Last Post: 11-11-2015, 03:00 PM
  4. Import text file and split data into specific sheets with Applet names
    By swethachepur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2014, 09:07 AM
  5. Import text file into excel and split data in specific sheets
    By chirilaionut in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-03-2013, 07:04 AM
  6. How Do I Split Text Based Upon Two Values To Split
    By HowdeeDoodee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2012, 05:05 AM
  7. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 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