Hello,
In Excel, press ALT + F11, then insert a module, paste macro text into
that module and go back to worksheet. You can call the function then
like other Excel worksheet functions.
Look here of you need more detailed info:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
Regards,
Bernd