+ Reply to Thread
Results 1 to 2 of 2

Macro to take a list of numbers and to create a list of the ranges

  1. #1
    Registered User
    Join Date
    11-29-2016
    Location
    UK
    MS-Off Ver
    2007 & 2010
    Posts
    24

    Macro to take a list of numbers and to create a list of the ranges

    Hi all,

    I am looking for some help for a Macro that would take a list of numbers within number types to define the ranges that the numbers fall into.

    It is probably as clear as mud but I will try to show what I mean. I have attached a Microsoft Excel document that contains the information but here is a small sub set of the information;

    4414608 announcement
    4414609 announcement
    4414611 announcement
    4414613 announcement
    4414614 announcement
    4414616 announcement
    4414617 announcement
    4414618 announcement
    4414714 announcement
    4415123 agent-loginid
    4415176 agent-loginid
    4415177 agent-loginid
    4415178 agent-loginid
    4415184 agent-loginid
    4415194 agent-loginid
    4413873 station-user
    4413874 station-user
    4413875 station-user
    4415097 station-user
    4415701 station-user
    4415703 station-user
    4415714 station-user
    4415715 station-user
    4415716 station-user
    4415717 station-user
    4415719 station-user

    Would output as follow
    announcement 4414608 4414609
    announcement 4414611
    announcement 4414613 4414614
    announcement 4414616 4414618
    announcement 4414714
    agent-loginid 4415123
    agent-loginid 4415176 4415178
    agent-loginid 4415184
    agent-loginid 4415194
    station-user 4413873 4413875
    station-user 4415097
    station-user 4415701
    station-user 4415703
    station-user 4415714 4415717
    station-user 4415719

    Any help would be must appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Macro to take a list of numbers and to create a list of the ranges

    Something like below. Output to sheet2.

    Please Login or Register  to view this content.
    Edit: Forgot to change 310 to variable instead of hard coded value. Updated code.
    Attached Files Attached Files
    Last edited by CK76; 04-04-2017 at 03:10 PM. Reason: See Edit:

+ 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. Replies: 1
    Last Post: 02-11-2017, 06:21 AM
  2. Replies: 6
    Last Post: 07-04-2016, 04:52 PM
  3. Use list to create named ranges
    By gerenrich in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-31-2014, 04:29 AM
  4. Replies: 3
    Last Post: 11-22-2013, 05:06 PM
  5. Replies: 2
    Last Post: 08-01-2012, 01:24 PM
  6. Ranges from list of numbers
    By Chrisrokc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-03-2011, 11:20 AM
  7. Assigning numbers into a list of ranges
    By siuchung in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2007, 03:50 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