+ Reply to Thread
Results 1 to 3 of 3

Get a number of rows with a cell

  1. #1
    Registered User
    Join Date
    12-08-2016
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    2

    Get a number of rows with a cell

    So, I need a formula that when i type in a cell x number, it gives me x rows.

    For example I type 12 (months) and I get 12 rows with the range number 1-12.

    Its for a project at college where I have to do a simulation and I need this in order to various things depending on the time the user wants to pay his loan.

    Thanks

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Get a number of rows with a cell

    A1= x number

    Try this in A2:

    =IF(ROWS($A$2:A2)>$A$1,"",ROWS($A$2:A2))

    Copy down.

  3. #3
    Registered User
    Join Date
    12-08-2016
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    2

    Re: Get a number of rows with a cell

    It works, but could explain the formula?
    what I did was =IF($M$4>B3;B3+1;""), where m4=the periods and b3 is 0 (manually inputed).

+ 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: 12
    Last Post: 01-31-2015, 02:11 AM
  2. [SOLVED] insert rows based on number in cell and copy the data down into the new rows
    By pziefle in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-05-2013, 11:19 AM
  3. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  4. [SOLVED] Excel VBA/Macro - Copy Number of Rows based on the number in a cell to another sheet
    By diane.alexander58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 11:32 AM
  5. number in cell is number to add number of rows wit copy some contex
    By nicollab in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2012, 08:09 AM
  6. VBA code to unhide X number of rows based on a number entered into a cell above
    By gazza365 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2010, 08:48 PM
  7. Replies: 0
    Last Post: 08-30-2010, 10:30 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