+ Reply to Thread
Results 1 to 3 of 3

Very slow process, sorting large table to identify range to apply array formulae

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    England
    MS-Off Ver
    Office 2010
    Posts
    13

    Question Very slow process, sorting large table to identify range to apply array formulae

    Hi

    I have written a process to help me accomplish the below, but is very slow to run on my current dataset.

    Import information about delivery of shipments from an XML file generated from an SQL database (This is the only option for importing the data but is not the main reason for the slowness of the process)
    Check current data to see if either the name of who signed for goods or the date for when the goods were signed for are on the table containing the imported information by adding a formula to two columns at the end of my data (one for name, one for date)
    First sort by a column that contains a formula to let me know if the shipment on that row is on the imported data, there isn't already a name for who signed for the goods, and one exists on the imported data.
    Then sort by this column A-Z (Values from the Formula are N or Y)
    Then for first Y row to lastrow, apply an array formula.
    The array formula is too long to be added in one line, so I have to add it as multiple parts using .replace. I found that sometimes the .replace didn't work, so I added in waits to let it catch up.
    Then repeat the same process for the date column

    It might be easier to show my code and a duplicate file that imitates the layout of what I'm trying to achieve. There is a lot more to the file that may be slowing this down, but I've only duplicated the parts relevant to this process.
    Current process (I do not comment my work very well):
    Please Login or Register  to view this content.
    One thing I tried was writing the table to an array, and running a loop through columns of the array to do the checks instead of using the helper columns. I used VBA to check each cell value against the imported data and if it needed to be replaced, I added the cell address corresponding to the array address to a range variable (using union after the first address).
    However this took longer to do just one column than my current method for both columns, so I abandoned this approach.

    I have taken out all the additional sheets that are part of the main spreadsheet, but tried to leave the Calculations page that I have in to try and keep the effect of the other work that is going on at the same time. I believe the problem may lie in the fact that I have used formulas in the data table that are being recalculated constantly but I'm not certain if this is the main issue or not.

    If anyone could offer some suggestions on how to increase the speed of this process or a better way to run this overall, it would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-10-2014
    Location
    England
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Very slow process, sorting large table to identify range to apply array formulae

    Sorry, I meant to include that I've cut out around 10k rows from the example file. I'm on ~25k on my main and it increases by approximately 1-2k per week

  3. #3
    Registered User
    Join Date
    07-10-2014
    Location
    England
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Very slow process, sorting large table to identify range to apply array formulae

    Bump no response, please let me know if any more information is required to help with this.

+ 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. Large table of data, need to process for call details
    By cwinchell2883 in forum Excel General
    Replies: 1
    Last Post: 12-13-2013, 03:09 AM
  2. Slow macro due to formulae being copied in a range of cells
    By Themd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2009, 04:00 PM
  3. Summarizing data and replacing slow array formulae
    By SM2009 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-16-2009, 04:35 PM
  4. [SOLVED] How to apply OFFSET as the range in a basic 'Copy' process...
    By cdavidson in forum Excel General
    Replies: 4
    Last Post: 11-08-2005, 04:50 PM
  5. [SOLVED] How to apply rounding across a range of cells with other formulae
    By Steve T in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-20-2005, 03:05 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