JOE Conner wrote:
Brian Barker wrote:
At 09:18 08/05/2008 +0200, Walter Metzger wrote:
I have XP professional and OpenOffice 2.4.0
I write in
C4 01.01.2008 (formatted as date)
B4 25.04.2008 (formatted as date)
D4 =TAGE(C4;B4)
I get the result 115, this is correct.
I save the file as Test-Makro.xls and close.
I open Test-Makro.xls again and see in
D4 #MAKRO?
I have to insert again in D4 =TAGE(C4;B4)
Is this correct or do I make a mistake (what mistake?)
If you choose to save your spreadsheet in Microsoft Excel (.xls)
format, you are converting your document to and fro every time you
save and reopen it, of course. If you save your document instead in
Open Office Calc's native .ods format, you will not find this problem.
Your TAGE function is presumably what Calc calls "DAYS" in English.
This function does not seem to exist in Microsoft Excel, and this
probably explains the result you see. The Calc help text explains
that "Some functions/formulas" "may cause conversion challenges" when
saving documents in Microsoft Excel format. There is also a warning
when you first save a document in a Microsoft Office format.
But the solution is easy: you don't need the DAYS formula at all, in
fact. (Perhaps that's why it is missing in Excel.) The smallest
unit of a date is a day, of course, so just subtracting the values
will yield the difference in days. Change your formula in D4 to
=C4-B4 and it will work whether you save your document as .ods or .xls.
I trust this helps.
Brian Barker
I confirm what he is reporting. My installed EXCEL viewer does show
115 so Excel seems to be happy with the =DAYS(C4;B4) function. When
opened back by Calc, the D4 reads #MACRO? but the input line still
shows =DAYS(B4;C4), which is correct, so I think Walter has uncovered
a bug. If I place the cursor in the input line, make no changes, and
press enter, the cell D4 now reads 115. I am attaching a test
spreadsheet, "TAGE.XLS" which probably won't make it through the mail
list stripper process.
Joe Conner, Poulsbo, WA USA (Using WinXP Pro and OxygenOffice 2.4.0)
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Using Excel 2003 - I got a #NAME? error on the macro. and 115 as the
answer doing +B5-C5
--
Skip
Bruce C. Reed
Systems Administrator
MIMvista Corporation
25200 Chagrin Blvd STE 200
Cleveland, OH 44122
Phone: (216) 455-0603
: (866) 421-2536
Cell : (330) 671-4736
Fax : (216) 455-0601
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]