OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

#MACRO? Error while calculating MONTHS

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
samf
Newbie
Newbie


Joined: 27 Jul 2007
Posts: 3

PostPosted: Wed Aug 01, 2007 6:06 am    Post subject: #MACRO? Error while calculating MONTHS Reply with quote

I entered =-DAYS(Y5;NOW())-(Z5*12) to calculate the days since the date in cell Y5 this year. This formula works, but when I save, close then re-open the spreadsheet, the cell displays #MACRO? - I edit the formulas without making changes to the formula and it works again, but the problem remains when I re-open the file. Any ideas? I searched in HELP but couldn't find anything about this error.
Back to top
View user's profile Send private message
TerryE
Super User
Super User


Joined: 16 Jul 2006
Posts: 550
Location: UK

PostPosted: Wed Aug 01, 2007 8:58 am    Post subject: Reply with quote

I tried the tet case on my PC and this worked fine before and after the save. What version are you running?

Have you thought of replication the cell with one which fixes the date =-DAYS(Y5;39300)-(Z5*12)and a cell with just =NOW() to see where the error occurs?
_________________
Terry
WinXPSP3, OOo 2.4.1, Ubunto 8.04 for development
Also try the Official OOo Community Forum where I mainly post now.
Back to top
View user's profile Send private message Visit poster's website
uros
Super User
Super User


Joined: 22 May 2003
Posts: 601
Location: Slovenia

PostPosted: Wed Aug 01, 2007 10:11 pm    Post subject: Reply with quote

Hi samf!
Did you save your file as .XLS? It sometimes causes problems...
Uros
Back to top
View user's profile Send private message
JohnViestenz
Newbie
Newbie


Joined: 31 Jul 2007
Posts: 3
Location: Port Henry, NY, USA

PostPosted: Mon Aug 06, 2007 9:28 am    Post subject: Reply with quote

I do not have the answer, but I do have a similar problem with a function (instead of with a sub). In this case, the Function works correctly, returning a valid answer. But when the sheet is closed and then reopened, I get #NAME# error instead of a value. I can edit the cell with the call to the function (but NOT change anything), and the correct result is displayed.

This is in an OOo 2.1 Calc sheet, saved as .ods file.

Hopefully someone has one asnwer that solves both our problems.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Aug 06, 2007 11:57 am    Post subject: Reply with quote

No need to use DAYS in Calc.
-DAYS(Y5;NOW()) is equivalent to TODAY()-Y5
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group