Hello,
I have been using a specific excel macros 4.0 workbook for years and recently upgraded to Excel for Mac 2011 from 2004. I am using MacOS 10.6. The macros were written for me by someone more than a decade ago and he is not available now.
When I use the macro it comes back with this error message and then hangs and I have to force quit. "names cannot look like references". The following is the code where the error is kicked out, specifically in the boldface lines.
Thanks in advance for any help you may provide and my apologies for any posting errors.
I have been using a specific excel macros 4.0 workbook for years and recently upgraded to Excel for Mac 2011 from 2004. I am using MacOS 10.6. The macros were written for me by someone more than a decade ago and he is not available now.
When I use the macro it comes back with this error message and then hangs and I have to force quit. "names cannot look like references". The following is the code where the error is kicked out, specifically in the boldface lines.
Code:
=ARGUMENT("Beginday",1)
=ARGUMENT("Endday",1)
=SET.NAME("Month1",MONTH(Beginday))
[B]=SET.NAME("Day1",DAY(Beginday))[/B]
=SET.NAME("Year1",YEAR(Beginday))
=SET.NAME("Month2",MONTH(Endday))
[B]=SET.NAME("Day2",DAY(Endday))[/B]
=SET.NAME("Year2",YEAR(Endday))
=IF(Day1=31,SET.NAME("Day1",30),)
=IF(Month1=2,IF(Day1=28,SET.NAME("Day1",30),IF(Day1=29,SET.NAME("Day1"=30),)),)
=IF(Day2=31,IF(Day1=30,SET.NAME("Day2",30),),)
=(Year2-Year1)*360+(Month2-Month1)*30+(Day2-Day1)
=RETURN(A46)
Thanks in advance for any help you may provide and my apologies for any posting errors.