=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.

Hi
I am facing I want to use =SEQUENCE() function to create a calendar template dinamically.
There are lots of use cases for this function such as: creating number lists in a matrix, date secuences, generate dinamic data for charts, data simulation using paterns or trends, generate invoice numbers, etc. I don’ t agree with your view seen new features of excell as useless, even though they might make mistakes creating features that might not be so usefull some times, they will not spend money creating features that will not give value to the customer and will not make Excel a better piece of software. that’ s why features are carefully evaluated by product managers. So if you want to give libreoffice an oportunity you can see the improvements in excel as a source of free oportunities of improvement. I used to be an Excell user, but I learned GNU/Linux and I like it very much open source software, but it is frustraiting sometimes how difficult is to do something with libreoffice that with Excel will take 2 seconds, for example something I used to do all the time on Excell was analizing my bank statement and transforming the date column date to a date then create a dinamic tables grouping by year, month, week, day, on excel it is just naturaly done in 5 seconds, on Libreoffice it is a pain in the back side hack that took me ages to solve.

Just upgrade to 24.8 or later, see ReleaseNotes/24.8 - The Document Foundation Wiki

Pivot table?