+ Reply to Thread
Results 1 to 6 of 6

Copy Formula On Range leaves wheel spinning

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Copy Formula On Range leaves wheel spinning

    Hello,

    I am using the code below to copy formulas down a range of rows. The number of rows is small. It is the number of columns that is longer. The process works but the wheel spins for a while. I was wondering if there was another way to input the code so it is faster and less obvious to the user that when they click a button it is calculating for a bit.

    This is an example of the formulas in the columns.

    =IF(ISNA(INDEX('Cleaning Sub Catg Item Data'!$E:$E,MATCH($A4&H$3&$F$3,INDEX('Cleaning Sub Catg Item Data'!$A:$A&'Cleaning Sub Catg Item Data'!$D:$D&'Cleaning Sub Catg Item Data'!$C:$C,0),0))),"Input Image Record",INDEX('Cleaning Sub Catg Item Data'!$E:$E,MATCH($A4&H$3&$F$3,INDEX('Cleaning Sub Catg Item Data'!$A:$A&'Cleaning Sub Catg Item Data'!$D:$D&'Cleaning Sub Catg Item Data'!$C:$C,0),0)))

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Copy Formula On Range leaves wheel spinning

    The file also calculates if I enter into any cell. It recalcs the whole file which takes a little bit. Like I said it works just not as efficient as I would expect.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Copy Formula On Range leaves wheel spinning

    Try:

    Please Login or Register  to view this content.

    You could try turning calculation to manual before and automatic after as well.

    Regards, TMS
    Last edited by TMS; 09-20-2013 at 10:54 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Copy Formula On Range leaves wheel spinning

    If you are using 2010, you can use IFERROR rather than testing the formula with ISNA and repeating it.


    Formula: copy to clipboard
    Please Login or Register  to view this content.



    And it would probably be a lot quicker if you used ranges rather than whole columns. Best to create some Dynamic Named Ranges.

    Regards, TMS
    Last edited by TMS; 09-20-2013 at 10:54 PM.

  5. #5
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: Copy Formula On Range leaves wheel spinning

    Thanks. It is taking just as long with the code you suggested. Also it doesn't seem to slow it down anymore with the If(ISNA formula vs just the straight index without iferror or if(isna. I am assuming it is because there are so many columns that VBA is pulling down.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Copy Formula On Range leaves wheel spinning

    I suspect that it is the last point that is most important in tems of performance. You are concatenating three cells to MATCH against three concatenated columns. In 2010, each row has over a million cells so that will take some doing, even though the majority of concatenated values will be blank.

    Either use the actual highest row, or an arbitrary high row value or a Dynamic Named Range.

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Seriously, it will make a big difference.

    Regards, TMS

+ 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. Formula for calculating leaves
    By gajendrahv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2013, 01:21 PM
  2. Spinning Roulette Wheel
    By bnitty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2013, 07:26 PM
  3. [SOLVED] Trouble with a formula, the result leaves out the commas
    By norrillous in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-30-2013, 07:33 AM
  4. [SOLVED] Macro to copy column from one worksheet to another (Problem when filter leaves zero files)
    By Gard5096 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2012, 01:14 PM
  5. Copy Table for all leaves
    By Trueno in forum Excel General
    Replies: 1
    Last Post: 05-02-2009, 09:40 PM

Tags for this Thread

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