Issue 56936 - problem with OFFSET() function
Summary: problem with OFFSET() function
Status: CLOSED DUPLICATE of issue 4904
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.0
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-10-29 22:36 UTC by timdeaton
Modified: 2005-10-30 00:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description timdeaton 2005-10-29 22:36:32 UTC
When I use the Offset() function inside a SUM() function, it results in an error
message.

I have many Excel97 spreadsheets using the offset function, generally inside
another function.  Used in an IF() function, it seems to work okay.  But when I
loaded an Excel97 sheet with the formula
   =-SUM(H$6:OFFSET(H147;-1;0)) in E147
Yesterday it gave me an "Error 508" message in that and all dependent cells.
Today, the same formula in the same place gave me an "#N/A" error message.

I use this type of formula so that I can move its row anywhere I want it in the
table and it will always sum all rows above it.

Anyway, I guess this exposes two problems:
1. Why is OFFSET() not working inside SUM() the same way it works inside IF()?
2. Why does it produce one error one day, and a different error the next day (in
 the same cell of the same UNEDITED spreadsheet)?
Comment 1 timdeaton 2005-10-29 23:04:46 UTC
After editing the formula to see how OFFSET() would work inside the SUMIF() and
SUBTOTAL() functions (which both returned a "#NAME?" error), when I returned the
formula to it's original state (as written above), it too now returns a "#NAME?"
error.
Comment 2 timdeaton 2005-10-29 23:08:39 UTC
(I had also saved it as an .ods file instead of .xls.)
Comment 3 Regina Henschel 2005-10-30 00:07:25 UTC
It is neither a problem with the function SUM nor with the function OFFSET. The
problem is, that your formula uses a range, where one of the references is
calculated. OOo is not able to use this. You must calculate the whole range. The
issue for the corresponding feature request is issue 4904.

*** This issue has been marked as a duplicate of 4904 ***
Comment 4 Regina Henschel 2005-10-30 00:08:00 UTC
closing duplicate