+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Collate Consecutive Numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    03-07-2010
    Location
    JHB, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Collate Consecutive Numbers

    Hi all. I have been an avid visitor of this site for awhile and thank u all for your help.

    Here is my problem.

    I have a set of phone numbers, about 6,000 of them, listed in a single column, sorted in descending order.
    I would like to write a formula that looks through the column and extracts phone numbers where the last three digits are consecutive numbers.
    ie 1300 360 601 and 1300 360 602.

    Is this possible?

    Thanks in advance for your advise.

  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: Collate Consecutive Numbers

    If those two numbers are in A1 and A2, then in B2, =RIGHT(A2,3) - RIGHT(A1,3) = 1 returns true if the last three digits are sequential.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-07-2010
    Location
    JHB, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Collate Consecutive Numbers

    Thanks for that.

    The numbers are in A1 to A4596.
    What I would like to do is search through the numbers in the column, and pull out any numbers, where the last three digits are consecutive, and paste them into a new worksheet.

    Does this make sense?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Collate Consecutive Numbers

    SHG was showing you how to get started....

    1) Put that formula in an empty adjacent column.
    2) Copy if down the data set
    3) Make sure that row1 has "titles" in it, that the data actually starts at row 2
    4) Turn on the Data > Filter > AutoFilter
    5) Filter the new column by "TRUE"
    6) Copy all the visible data to another worksheet.


    Done.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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