+ Reply to Thread
Results 1 to 8 of 8

Excel Forumula for Sequential Numbers

  1. #1
    Registered User
    Join Date
    05-03-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    Excel Forumula for Sequential Numbers

    Hi,

    Hoping to get some help on how to write a formula for sequential numbering. I have a file which contains a list of numbers and I want to see where the order breaks.

    My first value starts at 533165 and ends at 536370. I've been doing some research and have tried using the following formula but it's not producing the number set I want:

    = SMALL(IF(ISNA(MATCH(ROW(A$533165:A$536370),A$533165:A$536370,0)),ROW(A$533165:A$536370)),ROW(A1))

    Any suggestions would be greatly appreciated.

    Thanks!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel Forumula for Sequential Numbers

    Your formula is syntactically correct (but not robust).

    What exactly is the problem?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-03-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    2

    Re: Excel Forumula for Sequential Numbers

    Sorry, I should clarify and try to make this simple. Let's say for example I have the following data set:

    101
    102
    104
    105
    107

    The data begins in cell A1 and goes to cell A5. I want a formula that I can put into B1 which would identify the missing numbers (i.e. 103 and 106). The formula I'm using does not capture the missing numbers.

  4. #4
    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: Excel Forumula for Sequential Numbers

    Something simple:

    Row\Col
    A
    B
    C
    1
    Input
    Missing
    2
    101
    B2: =IF(A2+1<>A3, A2+1, "")
    3
    102
    4
    103
    104
    5
    105
    106
    6
    107
    108
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel Forumula for Sequential Numbers

    I was thinking Conditional Formatting.
    Use formula in Conditional Formatting:

    Select the range A533165 to 536370
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose the format of choice. This will highlight the last number in the sequence before every break in the sequence if there is more than one.

    or something really simple:
    insert a helper column and enter in A533165 the following and fill down the length of your data:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    TRUE will be returned for every break in the sequence. Use the filter on the Data Tab, select the data and the helper column and filter on TRUE.
    Last edited by newdoverman; 05-03-2015 at 08:16 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel Forumula for Sequential Numbers

    Quote Originally Posted by Ferarri View Post
    The formula I'm using does not capture the missing numbers.
    Sure it does. However, it won't return multiple results to a single cell. You have to return each result to its own cell (with that formula).

    Data Range
    A
    B
    1
    101
    103
    2
    102
    106
    3
    104
    4
    105
    5
    107
    6
    ------
    ------


    This array formula** entered in B1:

    =IFERROR(SMALL(IF(ISNA(MATCH(ROW(INDIRECT("101:107")),A$1:A$5,0)),ROW(INDIRECT("101:107"))),ROWS(B$1:B1)),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Last edited by Tony Valko; 05-03-2015 at 09:11 PM.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel Forumula for Sequential Numbers

    To get the missing values in the numeric sequence, this site may be of interest.

    http://smallbusiness.chron.com/micro...nce-40336.html

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel Forumula for Sequential Numbers

    That's not a very robust formula!

+ 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: 6
    Last Post: 03-12-2014, 12:16 PM
  2. can excel return sequential numbers in an IF statement?
    By aldermju in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-28-2008, 04:16 AM
  3. Help with Forumula for Whole Numbers
    By johnnygirl51 in forum Excel General
    Replies: 2
    Last Post: 10-19-2006, 12:38 PM
  4. Replies: 2
    Last Post: 04-05-2005, 11:06 AM
  5. How do I assign sequential numbers in an Excel 2003 PO template?
    By skiusa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2005, 06:06 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