Hi there,
Many thanks for that very clear description of your requirements.
Take a look at the attached workbook and see if it does what you need. I have rewritten your "HelligdagsNavn" routine as follows:
The optional argument "sYesNo" is used only in Cell B4 (for the date of 1 May yyyy) as follows:
where D10 is the cell which contains the Yes / No value
For all other cells the function is entered without the optional argument, e.g.
As far as I can tell, it's not really necessary to include your error handling when the function is used, i.e.
Please note that in order to get the site to accept this post I have had to use the highlighted "English" letters as replacements for the original Danish ones - the attached workbook contains the Danish characters copied from your workbook.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks