From Apache OpenOffice Wiki
Jump to: navigation, search

ARRAY as 3rd Parameter

Could the VLOOKUP() function be extended / overloaded to accept an array as 3rd parameter? Something like:

VLOOKUP(A2, _range_, ARRAY(_some_array_), BOOL)
# where _some_array_ contains the positions (aka columns) that we wish
#   to retrive from the range _range_
#   e.g. ARRAY(2,3,6) => retrive columns C0 + 2, C0 + 3 and C0 + 6
#   where C0 = first column in _range_

The retrieved values should be inserted into the same row as the VLOOKUP(), starting with the current cell and extending for length(ARRAY(_some_array_))

This way, there is NO need for:

  • duplicate operations
  • complex cache
  • operation could be completed in one pass

--Discoleo 22:56, 18 July 2007 (CEST)

No, that would change the syntax of the function itself and lead to interoperability problems with other spreadsheet applications, it is also not defined this way by ODFF (ODF Formula specification). Furthermore, changing document content by adding cell content during formula interpretation is a no-go as it may lead to various problems. --erAck 14:12, 19 July 2007 (CEST)
Personal tools