=SEQUENCE Formula

Hi,
Is there solution for =SEQUENCE formula from Excel in Libreoffice?
Example how to configure following formula:
=SEQUENCE(C14;C15;A14;C16)

Thanks,

2 Likes

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

It’s really strange what hokum developers of Excel assume to be useful.

I find this “hokum” very useful and would appreciate seeing it in Calc, just like I would many of the newer formula additions from Excel.

Eager to see a convincing example.

Might I get a hint?

You sound more eager to start an argument about whatever example I present than to actually see any, so I’ll just leave you to it, I think.

Don’t worry about how I sound.

  1. Simply give the example.
  2. Note that enhancement requests go to bugs.documentfoundation.org.
  3. Also note that it was you who started an argument about an opinion I posted years ago together with a solution/workaround, and that got a ‘like’ by one, but never since was commented on.