penguino29
Registered User.
- Local time
- Today, 10:44
- Joined
- Dec 23, 2010
- Messages
- 52
Hi sseto23,
Ok, I've churned out some codes that should do the job - I am no VBA expert so my code is a bit crude and not fancy, but it should show you the speed improvement that you are looking for.
I've kept it simple, the idea is to:
Then I modified your function, instead of using Dlookup, now it uses the search function to find the holidays from the array.
Try out the codes and report back please. Thanks.
Ok, I've churned out some codes that should do the job - I am no VBA expert so my code is a bit crude and not fancy, but it should show you the speed improvement that you are looking for.
I've kept it simple, the idea is to:
- create a one-dimensional array,
- loading the holidays table and storing the dates into the array
- create a function to search in the array for a given date
Then I modified your function, instead of using Dlookup, now it uses the search function to find the holidays from the array.
Try out the codes and report back please. Thanks.