+ Reply to Thread
Results 1 to 6 of 6

Numeric intervals

  1. #1
    Registered User
    Join Date
    09-24-2013
    Location
    WA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Numeric intervals

    Hi I have a big group of numeric values and I would like to automatically group them in regular intervals

    Example: I have 1,2,3,4,7,8,9,11,12,13,14 I would like to automatically define ranges like: 1-4, 7-9, 11-14

    Any ideas? is it possilbe to do this in Excel? R?

    Many thanks!

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Numeric intervals

    Hi, staedtler,

    maybe like
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-24-2013
    Location
    WA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Numeric intervals

    Quote Originally Posted by HaHoBe View Post
    Hi, staedtler,

    maybe like
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Thanks mate for the replay , but the case is that I have used that array only as an example.
    I have actually prety big gorup of numeric values from different datasets, therefore I would need a generic formula (or code) doing that.
    Cheers
    M

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Numeric intervals

    or maybe like
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-24-2013
    Location
    WA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Numeric intervals

    Quote Originally Posted by nilem View Post
    or maybe like
    Please Login or Register  to view this content.
    Thanks nilem!!!
    this works like a charm! great help, thank you!

    The only thing to improve is when you have only one number in a range, the VB code repeat that number:
    for example, we have 1,2,3,4,7,9,10,11
    the VB code returns:1-4,7-7,9-11,

    and there is a comma (,) at the end of the range....

    Many thanks mate for a great help!!!
    Cheers
    M

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Numeric intervals

    as an option
    Please Login or Register  to view this content.

+ 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] Copy With Intervals Paste With No Intervals.
    By gorinw10 in forum Excel General
    Replies: 12
    Last Post: 07-20-2013, 12:23 PM
  2. Converting Data in Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 02:42 AM
  3. Need to Transpose Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2011, 08:30 PM
  4. [SOLVED] Count Intervals of 1 Numeric value in a Row and Return Count down Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-04-2005, 12:05 PM
  5. Count Intervals of 2 Numeric values in same Row and Return Count across Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-24-2005, 06:05 PM

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