+ Reply to Thread
Results 1 to 3 of 3

Copy formula down column for a given number of rows

Hybrid View

  1. #1
    Registered User
    Join Date
    06-28-2006
    Posts
    28

    Question Copy formula down column for a given number of rows

    Hi,

    I have a spreadsheet that has a formula in for example cell A2. Above this in cell A1 is a number, so for example 170.

    I would like to be able to copy the formula in cell A2 for the given number in cell A1, so in this case 170 rows.

    This will then be used on a various columns with different numbers in say B1, C1 etc.

    Any help would be gratefully received.

    Thanks,
    Dominic.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copy formula down column for a given number of rows

    cells(2,1).resize([A1]).formula=[A1].formula

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Copy formula down column for a given number of rows

    A formula way to do that would be to alter you current formula in A2 to include a check on what row it is on as compared to the number in A1

    e.g.

    =IF(ROWS(A$1:A2)>A$1,"",4+5)

    replace 4+5 with your actual formula (without the = sign in front).

    Then copy down as far as you want....

    You can then copy across multiple columns.

    In the end, if this proves inefficient and resource intensive, you may be better with someone helping you create a macro.... but figured this would be an easy alternative.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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