Hi all,
I have a working solution for my problem, but it's really, painfully slow during execution. I'd like to know if there's a better solution that I've not considered.
I have a Sheet1 w/ 10 columns and 1000's of rows (usually 3000 - 7000) and data in each cell. I have a Sheet2 w/ 20 columns and 2000 rows and data filling most columns. Sheet1 contains a list of parts and Sheet2 contains a list of high priority parts to be flagged from Sheet1. Both sheets are AutoFiltered.
I want to compare each entry in column A on Sheet2 to the entire column B on Sheet1, and sum the associated quantities from column C on Sheet1 for each match into column D on Sheet2. This ends up looking like this for a single cell:
=SUMIF(Sheet1!B:B,A1,Sheet1!C:C)
This sounds exactly like the SUMIF() function, and that's what I'm using and it works correctly. But, because of the large number of comparisons, it's really slow, taking perhaps 5 minutes to fully populate all entries in column D on Sheet2. And any time I touch the workbook, i.e. to filter for a particular part on Sheet1, the recalculation time is absurd, and unnecessary.
My workaround has been to let the calculation run the first time, then disable recalculation, copy the values from column D on Sheet 2 into a new Sheet3, then deleting Sheet2 and re-enabling calculations. Since I'm never changing the data, I don't mind losing the calculation for those few steps, but I have to wonder that this all seems like a terrible hack and that I must be missing a more elegant (and speedy!) solution.
Any advice or tips would be appreciated. If I'm already doing about as well as I can, then advice on using VBA to disable or enable calculation would be appreciated.
Thanks,
Adam
Bookmarks