CALC Find last row programmatically

Hi everyone,

can anyone please tell me whether is there a way to find the last row in a formula and use it?

Everytime i need to calculate the whole column, I use: =SUM(A1:A1048576), but I’s not generical and it won’t work on smaller sheet (LO<3.3).

Can I use something like: A1:A(LAST) OR A.LASTROWPROPERTYFROMSETTINGS()?

Thanks.

@JohnSUN this gives me 0 or Err:522 on the same cell, and seems to contain the “1048576” anyway… (You didn’t read well my question, your answer find the last element in a column)

See this topic

Still wrong… I’d need something like =SUM(A:A) in Excel, but, as read on the Bugzilla page from Pedro, there’s no such thing in LO

OK. Maybe can help this tool - Define Label Range

Try this

=ROUND(SUMPRODUCT(MAX((A1:A1048576<>"")*(ROW(A1:A1048576))))

In Excel (and any other spreadsheet other than Calc) you just need to do =SUM(A:A) meaning Sum values in column A whatever length.

It’s a long time bug, but LO developers consider this an “enhancement”
https://bugs.freedesktop.org/show_bug.cgi?id=44419