+ Reply to Thread
Results 1 to 14 of 14

Copying Down Formulas

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Copying Down Formulas

    I am using Excel 2007 and have a spread sheet of 800 columns and 163,000 rows. In each cell of the first row are equations similar to this: =VLOOKUP(F4,Sheet2!$A$1:$ADT$571,H$3)-VLOOKUP(G4,Sheet2!$A$1:$ADT$571,H$3)

    I am trying to copy down this row to row 163,000 and am only able to get to around row 15,000 before I get the message that I have run out of system resources. I have tried turning off auto calculations in the cells. What else can I do to populate the cells with the formulas?

    Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Copying Down Formulas

    Hey,
    first select the range where you want to formula to be pasted, then run this macro.
    I assumed that your selection starts in row 4. If not, tell me and I will alter the code.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Copying Down Formulas

    If you could post a small sample of your sheet so we can see what you are trying to do, it would help us a lot.
    I also thing an INDEX/MATCH combination needs less resources

  4. #4
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    Here is the spreadsheet I am working with. I tried the VBA code and am getting an error.

    Any other ideas?

  5. #5
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    Here is the file. I have removed alot of the data from Sheets 1 & 2 to allow for upload. But again, I am trying to drag down the first row of formulas about 163,000 rows. The data table in Sheet 2 has 571 rows of 800 columns.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    Any thoughts on this?

  7. #7
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Copying Down Formulas

    Hi again,

    how about this one?
    http://spreadsheets.about.com/od/tip...30filldown.htm

    Applied to your case:
    1. highlight your first row of data (from column C to the end)
    2. press F5 (brings up the "Go to" dialog box)
    3. type in the bottom right cell address of the range where you want to apply the formula (should be something like this: ADT163000)
    4. click OK while holding shift (now all that huge range should be highlighted)
    5. press Ctrl + D
    6. formula should be applied everywhere.

    Tell me if it works please.

  8. #8
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    Neat trick, but it doesn't work for this situation. I first get the warning notice of "large data operation", after I click ok I get "Excel cannot complete this task with available resources. Choose less data or close other applications"

    Other ideas?

  9. #9
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Copying Down Formulas

    Wow.

    How about applying it in smaller chunks? Like for every ten thousand row?
    Also, once you have the correct data in the cells, you can use Copy-->Paste Special-->Values, so formulas disappear. Makes the file size smaller.

  10. #10
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying Down Formulas

    Try this code. i have also attached the file.

    I created a copy of sheet 1 and named it test.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jleonard5106; 02-11-2013 at 06:17 PM. Reason: File did not Upload

  11. #11
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    The VBA code works to about row 7000 and then I get an error stating that there are no more system resources available to continue.

    Other ideas?

  12. #12
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying Down Formulas

    I am still working on it.

    are the formulas important or just number?

  13. #13
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying Down Formulas

    Try this Code

    Took away the vlookups and just used simple subtractions

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    02-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copying Down Formulas

    Wow, I really appreciate your work. I don't use message boards often, but it is nice to see people so willing to help others especially with the complexity to your VBA code. I started to run it, but it is taking a long time (which is ok), I will have to run it when I can walk away from the computer for a bit. I will let you know the final outcome. Thanks again. I will follow up soon.

+ 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