+ Reply to Thread
Results 1 to 3 of 3

Formula or macro to list all numbers between two numbers

  1. #1
    Registered User
    Join Date
    05-21-2016
    Location
    United States
    MS-Off Ver
    MS office 2010
    Posts
    3

    Formula or macro to list all numbers between two numbers

    Good afternoon. I am looking for either a formula or VBA that will list all numbers between two numbers in different cells. Example: number 1 is in cell A1 and number 10 is in cell A11. I would like to fill in the numbers 2 through 9 in the cells in between A1 and A11. I am using the list function in data validation, so the begin and end numbers will change based on what numbers are chosen from cell A1 and cell B1. I have attached an example.


    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Formula or macro to list all numbers between two numbers

    You can put this formula in A2:

    =IF(ROWS($1:1)+$A$1>$B$1,"",ROWS($1:1)+$A$1)

    then copy down as far as you like.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-21-2016
    Location
    United States
    MS-Off Ver
    MS office 2010
    Posts
    3

    Re: Formula or macro to list all numbers between two numbers

    Outstanding, thank you sir.

+ 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: 8
    Last Post: 11-19-2014, 06:12 PM
  2. [SOLVED] re-numbering a list of numbers based on another list of numbers to get a sequential order
    By ryan.wherry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-10-2014, 03:27 PM
  3. [SOLVED] Macro to pull 6 random numbers from a list of numbers.
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2014, 07:07 AM
  4. [SOLVED] search for all unique numbers down a column and print a list of those numbers in another
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2014, 11:08 PM
  5. Replies: 6
    Last Post: 02-27-2014, 07:04 PM
  6. [SOLVED] Getting Excel 2007 to list the cell numbers of the top five ranked numbers in a column.
    By Securitysports in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2013, 11:42 AM
  7. Formula or Macro to convert list of numbers to city name
    By odscougar in forum Excel General
    Replies: 6
    Last Post: 01-06-2012, 07:45 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