+ Reply to Thread
Results 1 to 8 of 8

Ranges from list of numbers

  1. #1
    Registered User
    Join Date
    04-25-2011
    Location
    Oklahoma
    MS-Off Ver
    Excel 2011
    Posts
    9

    Ranges from list of numbers

    I am wanting to retrieve ranges of the sequential numbers in a list of numbers. For example..


    1
    2
    3
    4
    5
    6 "1-6"
    8
    9
    10 "8-10"
    14
    15
    16 "14-16"


    What is the best way to do this? Anyone have a quick solution?

  2. #2
    Registered User
    Join Date
    02-27-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Ranges from list of numbers

    You could loop through the series using vba?

    Please see attached macro based solution I have done for you.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Regards
    MrExcelPro

  3. #3
    Registered User
    Join Date
    04-25-2011
    Location
    Oklahoma
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: Ranges from list of numbers

    That works well, but it will up the message box with more left. Is there a way to put that information into the spread sheet?

  4. #4
    Registered User
    Join Date
    02-27-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Ranges from list of numbers

    I'm not sure I know what you mean. Do you want to insert the missing numbers or do you want to record the list of ranges, this method indentifies the ranges as you asked?

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Ranges from list of numbers

    Or maybe just a helper column

    With your numbers in Column A, begining A2

    Helper Column (This can be hidden)
    In B2
    Please Login or Register  to view this content.
    In C2
    Please Login or Register  to view this content.
    Drag/Fill both Down
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    04-25-2011
    Location
    Oklahoma
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: Ranges from list of numbers

    Just the record of the sequential ranges.

  7. #7
    Registered User
    Join Date
    04-25-2011
    Location
    Oklahoma
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: Ranges from list of numbers

    Marcol! That works If there is a macro that would be good too. Thanks for the help guys.

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Ranges from list of numbers

    Try this UDF as a posible alternative solution
    Please Login or Register  to view this content.

    Enter in Excel like so
    syntax
    ListSequences(the first cell in your sequence,the absolute row for the first cell)
    e.g.
    Please Login or Register  to view this content.
    Drag/Fill Down

    Hope this helps
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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