+ Reply to Thread
Results 1 to 6 of 6

How to split column before number interval

  1. #1
    Registered User
    Join Date
    01-30-2017
    Location
    berne
    MS-Off Ver
    2007
    Posts
    3

    How to split column before number interval

    Hi to all, I work on a table with a lot of records with street names and numbers and intervals like this:
    1134 25 DECEMBER 1200 1399
    1540 25 MAYA 1100 1299
    1355 25 AUGUSTO (19 MAY) 1600 2399

    and I would like to split the content at the first space and then before the number interval. I used the formula =LEFT(A1,FIND(" ",A1,1)-1) and =RIGHT(A1,LEN(A1)-FIND(" ",A1,1)) and I get a separation at the first space (and the content into two colums).I am not sure how do I split the remaining content before the number interval.
    I will be very grateful if anyone can help with this!
    Thanks a lot!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: How to split column before number interval

    If you want to split at each space, it would be easier to use Data | Text-to-Columns.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to split column before number interval

    Your test data is such:
    All the numbers at the end are ALWAYS four digits long
    Each row of data ALWAYS ends with two numbers.
    Since you have not supplied any variation of this I must assume this is the case on EVERY piece of data you have.

    So use this for the second formula
    =MID(A1,6,LEN(A1)-15)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to split column before number interval

    Quote Originally Posted by Pete_UK View Post
    If you want to split at each space, it would be easier to use Data | Text-to-Columns.

    Hope this helps.

    Pete
    I dont think will work as the last element of data includes a date with another date in brackets.
    The OP's subject says split before number so I assume he just wanst to extract the first number and the date related info.

  5. #5
    Registered User
    Join Date
    01-30-2017
    Location
    berne
    MS-Off Ver
    2007
    Posts
    3

    Re: How to split column before number interval

    Hi Pete_UK, thanks a lot for your answer! I want to split at the first space (keep the first number in a separate column) and then at the next to last space (basically keep the number intervals in a separate column).

  6. #6
    Registered User
    Join Date
    01-30-2017
    Location
    berne
    MS-Off Ver
    2007
    Posts
    3

    Re: How to split column before number interval

    Hi Special-K, thank you for your reply. Actually, the numbers in the intervals can vary in lenght from 2 to 4 digits as below (they always are at least two numbers):
    1300 25 OLIVEDA 100 215
    1634 PARAYA 2° 1000 1500
    1250 CORA 901 1199
    1356 MEXICO 10 99

    so the criteria for separation would be really the next to last space....
    if I use this =SUPPRESPACE(DROITE(SUBSTITUE(A72;" ";REPT(" ";50));50)) I get something like the last number of the interval. But it doesn't really do the job.

+ 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] Cells contains number to split in every 5 digits and paste in a column
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 10-27-2016, 01:43 PM
  2. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  3. Replies: 4
    Last Post: 01-07-2015, 08:29 PM
  4. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  5. Return value of interval number
    By jacvgraca in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2014, 12:39 PM
  6. [SOLVED] split text/number column into 2 columns
    By mb1074 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-10-2013, 04:42 PM
  7. [SOLVED] count the number of events in an interval
    By invictus in forum Excel General
    Replies: 4
    Last Post: 06-11-2012, 06:17 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