NigelTufnel
Board Regular
- Joined
- Apr 3, 2008
- Messages
- 53
- Office Version
- 365
- Platform
- Windows
I'm working on a project in which I have to do a large number of lookups (thousands) on a series of large Excel lists (thousands of rows, perhaps ten columns each). I've done a lot of VBA programming, but not so much with databases/lists.
For each lookup, I will set three or four criteria, and a single record will be returned (if the data is good). I need to extract around five pieces of information for that unique record.
What's the best way to do this using VBA if I'm interested in calculation speed?
I put some code together that used Autofilter, and it seemed to run fine last night (it returned a result quickly and accurately). For reasons I cannot explain, today it's taking 15 seconds to impose each criteria on the database, so each lookup takes a minute long. I'm running Excel 2007 in Windows 7.
Is using Autofilter the best way to accomplish this task?
Another possibility is to manually set up some columns that return TRUE/FALSE for each criteria and another column that takes the AND across each row. I could then simply search for a TRUE in the AND column--this has got to take less calculation time than the Autofilter currently takes, although it will require more prep effort.
Any suggestions?
Thanks.
For each lookup, I will set three or four criteria, and a single record will be returned (if the data is good). I need to extract around five pieces of information for that unique record.
What's the best way to do this using VBA if I'm interested in calculation speed?
I put some code together that used Autofilter, and it seemed to run fine last night (it returned a result quickly and accurately). For reasons I cannot explain, today it's taking 15 seconds to impose each criteria on the database, so each lookup takes a minute long. I'm running Excel 2007 in Windows 7.
Is using Autofilter the best way to accomplish this task?
Another possibility is to manually set up some columns that return TRUE/FALSE for each criteria and another column that takes the AND across each row. I could then simply search for a TRUE in the AND column--this has got to take less calculation time than the Autofilter currently takes, although it will require more prep effort.
Any suggestions?
Thanks.
Last edited: