Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I find a range of numbers in an Excel file?

I have a large list (5,000 or so) of numbers and I want to find if any of these numbers are in a range/consecutive.

For example:

7315456878

7339495458 ----------------------

7339495459 ----------------------

7385485487

I need an easy way to find if numbers are in a range like middle two above.

Instead of just looking at the last numbers, is there a macro that I could use?

2 Answers

Relevance
  • 7 years ago
    Favorite Answer

    all you want to do is find consecutive #'s

    i will assume the sample given is a good sample, and give a basic formula.

    - assume the sample starts in cell A1

    - copy&paste this in B2 (yes B2 not B1)

    =IF(A1+1=A2,"this is a consecutive number","")

    you should get a blank.

    drag the cell down,

    or copy the cell

    select 5000 rows below

    click paste

    most cells will be blank.

    whenever theres a consecutive number, then column B will show a note.

    you can expand the formula to make it do what you want.

    you can start in Row#2 and turn on the autofilter.

    let me know how it works.

  • ?
    Lv 7
    7 years ago

    It will take you less time to do it manually.

Still have questions? Get your answers by asking now.