Providing easy-to-read function names
Geeks like us have no qualms about typing =RTD(“GeodesiX.RTD”,,”geocode”, “status”, “Tokyo”) in an Excel cell to get a value. Normal people find this a bit clumsy, and it would be nice to humour them.
Excel provides a way to this quite simply. We create a UDF called Geocode whose sole function is to compose the ghastly RTD formula and return that to Excel #15#.
The only fine point here is that the Geocode function has two options.
- Return the RTD formula. Excel will note this and continuously call the RTD module to obtain updates of the value
- Return an actual value. The UDF now behaves like any other non-volatile function: Excel will never call it again unless its arguments change.
GeodesiX makes use of this to avoid being called a second time once a geocode has been resolved, on the reasonable assumption that once we have the latitude of a place, it’s not likely to change in the near future.
If you’re implementing a true real-time server, where values change continuously, your UDF must always return the =RTD() formula.