AOB
Well-known Member
- Joined
- Dec 15, 2010
- Messages
- 664
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
Hi guys,
I have a UDF which takes a range as in input and returns a text string. The UDF is fairly complex (it queries Outlook to concatenate various contact information based on the range parameter) and takes a couple of seconds to run for one instance (i.e. one single range) so I generally turn the automatic calculations off and then fire the calculation manually when everything's ready.
I've applied the UDF to a table, so it should perform the same function across a number of rows (roughly 300 at the moment) and what's strange is, when all the 'processing' is complete, there are only values in some cells / rows, and not in others?
I figured it must be a failure to identify the contact (which should return a null / ZLS anyway), but if I click into an individual cell (which appears blank) and F2+Enter (to retrigger the calculation in that cell), it works fine, and populates with the expected string.
In some cases, it returns an error (#VALUE!), which again I assumed to be due to an unhandled error in the VBA. But again, if I click into such a cell, F2+Enter, it produces the desired result.
Why is this, and how can I fix it so it works across the whole table when I just Calculate Sheet, rather than having to go through the whole sheet and calculate each cell individually?
Cheers!
AOB
I have a UDF which takes a range as in input and returns a text string. The UDF is fairly complex (it queries Outlook to concatenate various contact information based on the range parameter) and takes a couple of seconds to run for one instance (i.e. one single range) so I generally turn the automatic calculations off and then fire the calculation manually when everything's ready.
I've applied the UDF to a table, so it should perform the same function across a number of rows (roughly 300 at the moment) and what's strange is, when all the 'processing' is complete, there are only values in some cells / rows, and not in others?
I figured it must be a failure to identify the contact (which should return a null / ZLS anyway), but if I click into an individual cell (which appears blank) and F2+Enter (to retrigger the calculation in that cell), it works fine, and populates with the expected string.
In some cases, it returns an error (#VALUE!), which again I assumed to be due to an unhandled error in the VBA. But again, if I click into such a cell, F2+Enter, it produces the desired result.
Why is this, and how can I fix it so it works across the whole table when I just Calculate Sheet, rather than having to go through the whole sheet and calculate each cell individually?
Cheers!
AOB