Hi,

Is there solution for =SEQUENCE formula from Excel in Libreoffice?

Example how to configure following formula:

=SEQUENCE(C14;C15;A14;C16)

Thanks,

Hi,

Is there solution for =SEQUENCE formula from Excel in Libreoffice?

Example how to configure following formula:

=SEQUENCE(C14;C15;A14;C16)

Thanks,

I believe you can not easily generate an arbitrary size matrix by formula in Calc.

I guess I would create a â€śfoundation matrixâ€ť in a separate sheet for this kind of source data, but I canâ€™t envision a use case. If you describe your purpose and/or workflow, someone may have a more specific suggestion for a workaround.

Itâ€™s really strange what hokum developers of Excel assume to be useful.

However, if your

```
Number of Rows
Number of columns
Start value
Step
```

are given in the cells A1:A4 in this order, itâ€™s as simple as

`=A3+A4*(A2*(ROW(OFFSET(INDIRECT("A1");0;0;A1;1))-1)+(COLUMN(OFFSET(INDIRECT("A1");0;0;1;A2))-1))`

entered somewhere for array evaluation (`Ctrl+Shift+Enter`

).

The difficult part comes when a sheet containing such a construct needs changes like enhancements/maintenance/scaling up or down/insertion of rows/columns for different purposesâ€¦

You will then get plenty of problems for little benefit. In other words: The disadvantage-benefit ratio is great.

Of course itâ€™s **very** simple to write the â€śSEQUENCE()â€ť thing as a UDF.

See attached example:

disask89001sequenceLikeExcelAndMore.ods (19.8 KB)

Note: The included UDF can only run if either document macros are permitted, or the code of the little function is moved to a module of the Standard library. The demo for the above given solution is independent of this.

1 Like