you can do it using a user-defined-function. The UDF is then used on the worksheet.
Would that class as a macro for this purpose?

regards