To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=62015
                  Issue #:|62015
                  Summary:|Using empty (null) array in MATCH function crashes
                          |application
                Component:|Spreadsheet
                  Version:|OOo 2.0.1
                 Platform:|PC
                      URL:|
               OS/Version:|Windows XP
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|editing
              Assigned to:|spreadsheet
              Reported by:|hobbsjm





------- Additional comments from [EMAIL PROTECTED] Mon Feb 13 19:31:19 -0800 
2006 -------
Passing an empty (null) array to the MATCH function causes the application to
crash and this can happen in a number of scenarios.  I first observed it when
using the following cell formula:

 =IF(EOMONTH(C17;0)>='Sheet 1'.S11;
  INDEX('Sheet 1'.V11:V41;(MATCH(EOMONTH(C17;0);'Sheet 1'.S11:S41)));0)

The problem occurs when copying this cell to a new sheet: copying either the
whole sheet, the row or column containing the cell or just the cell itself has
the same effect. The problem arises because the sheet reference is relative
rather than absolute and thus the copied cell becomes:

 =IF(EOMONTH(C17;0)>='Sheet 2'.S11;
  INDEX('Sheet 2'.V11:V41;(MATCH(EOMONTH(C17;0);'Sheet 2'.S11:S41)));0)

Now, if cells S11:S41 are empty in the newly referenced sheet, the application
crashes, before the copy completes.

A work around is to make the reference in the MATCH function absolute before
copying it, as follows:

 =IF(EOMONTH(C17;0)>=$'Sheet 1'.S11;
  INDEX($'Sheet 1'.V11:V41;(MATCH(EOMONTH(C17;0);$'Sheet 1'.S11:S41)));0)

In my case, this is the behaviour I really want anyway, but other people may not
want absolute references and may want to copy a sheet before entering data in
any newly referenced sheet, but it is at least a work around. 

In order to determine that it was the MATCH function that was at fault, I
replaced each of the relative sheet references in the formula with absolute
references in turn and the problem only occurs when copying the MATCH function
with the relative rather than absolute reference.

To further test this I typed the following cell formula into an empty cell on
the same sheet:

 =MATCH(EOMONTH(C17;0);$'Sheet 3'.A1:A10)

This references an empty array on an entirely different sheet, 'Sheet 3', with
the same result: the application crashes.

Therefore, the most obvious cause of the problem seems to be that the MATCH
function isn't error trapping null arrays.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to