+ Reply to Thread
Results 1 to 7 of 7

Creating Macro that detects what numbers/how many numbers are being skipped in a column

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    11

    Creating Macro that detects what numbers/how many numbers are being skipped in a column

    Hi guys,

    I am trying to make a simple macro that will count and inform me of all the numbers that are skipped out of a column. I attached the file below. The column contains over 7k rows of mostly consecutive numbers with around 100 random numbers being skipped. There are also some blank spaces with "N/A" in them. I want it to completely ignore the N/A cells and tell how many/what numbers are missing.

    Thanks in advanced!
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    Hi every day and welcome to the forum,

    See the attached where the answer is in a 5 step process.
    Create a Helper column with all numbers from the start to the end..
    Paste the values only over Helper column
    Create a Test column to see if it has a match
    Sort from small to large and your answers will move to top.
    No VBA needed... Did you really want a VBA answer.
    Find Missing Numbers in sequence.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-22-2017
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    11

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    Hi Marvin,

    Thanks for the quick answer. You just blew my mind!

    I wanted it in VGA because I was planning on adding onto another macro I have with it.
    What I want it to do in the end is make a new row with a the actual numbers that are missing.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    OK try this
    Please Login or Register  to view this content.
    Find Missing Numbers in sequence VBA.xlsm

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Registered User
    Join Date
    02-22-2017
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    11

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    Thanks guys worked perfectly. Much appreciated.

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Creating Macro that detects what numbers/how many numbers are being skipped in a colum

    You're welcome. Glad we can offer some help for you
    Regards

+ 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] Macro that detects numbers out of sequence, then inserts a new row and adds the missing
    By Lmel0611 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2015, 11:11 PM
  2. [SOLVED] Macro for skipped serial numbers
    By tariqnaz2005 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2014, 11:07 AM
  3. Problem creating a macro to convert numbers which are stored as text
    By LemonTwist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2012, 02:28 AM
  4. Replies: 6
    Last Post: 12-17-2011, 04:58 AM
  5. Creating a Macro to search and match two sets of numbers
    By krazzed in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-12-2009, 11:18 AM
  6. Replies: 0
    Last Post: 03-19-2006, 08:40 PM
  7. Creating a macro to replace numbers
    By Phil Tukey in forum Excel General
    Replies: 8
    Last Post: 08-18-2005, 02:05 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