+ Reply to Thread
Results 1 to 12 of 12

various runs of spaces as delimiters

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    various runs of spaces as delimiters

    How can I identify and number beginning of consecutive spaces in a string -- so I can parse the string?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: various runs of spaces as delimiters

    You could use TRIM and there would be any.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: various runs of spaces as delimiters

    shg, My problem is to remove each set of spaces in separate executions so that I can parse out the text between the spaces. Thanks!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: various runs of spaces as delimiters

    I don't know what that means .... How about an example.

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: various runs of spaces as delimiters

    08/18/11 2359 Discharge Outpatient HTSP IMAGING SERVICES MIC

    ---------- Post added at 04:41 PM ---------- Previous post was at 04:40 PM ----------

    08/18/11 2359 Discharge Outpatient HTSP IMAGING SERVICES MIC
    When I post this reply it trims the spaces between items which number from 5 to 10.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: various runs of spaces as delimiters

    That's what you have -- what do you want to do with it?

  7. #7
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: various runs of spaces as delimiters

    08/18/11 2359
    08/18/11 2359

    Discharge

    Outpatient

    HTSP IMAGING SERVICES MIC

    Then put into row.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: various runs of spaces as delimiters

    And the number of spaces between each field is always >1, and constant from one record to the next?

    What are the spacings?

  9. #9
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: various runs of spaces as delimiters

    Always >1, and never constant.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: various runs of spaces as delimiters

    If you can use a UDF,

    Please Login or Register  to view this content.
    E.g.,

    Please Login or Register  to view this content.
    Select B2:E2, paste =ParseX(A2) in the formula bar, press and hold the Ctrl and Shift keys, then press Enter.

    If you don't want a UDF, someone will likely paste a formula-based solution.

    If the varying spaces because the fields always start at fixed positions withing the string, a formula solution would be easy.

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,432

    Re: various runs of spaces as delimiters

    If I understand what you are doing (and I'm not sure I do), you could use the TExt to columns command -> select delimited data -> select space as the delimiter and make sure consecutive delimiters as on is checked.

  12. #12
    Registered User
    Join Date
    08-24-2012
    Location
    Vandervoort, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: various runs of spaces as delimiters

    The delimiter cannot discern between one space and two spaces.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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