You're right — LibreOffice Calc doesn't support Google Sheets' ARRAYFORMULA function.
But you can achieve a similar effect with array formulas entered differently in LibreOffice Calc.
How to create an array formula in LibreOffice Calc for your case:
-
Select the entire range in column J where you want the formula to apply — say, J2:J1000 (adjust as needed).
-
Type the formula (without equals/sign), for instance:
CONCAT(A2:A1000; G2:G1000)
- Instead of pressing Enter, press Ctrl+Shift+Enter to enter it as an array formula.
This will fill the range with the concatenated values of columns A and G.
Important notes:
-
LibreOffice expects semicolons ; as argument separators by default (depending on your locale), so you might need to use CONCAT(A2:A1000; G2:G1000) or CONCAT(A2:A1000, G2:G1000), check which one works.
-
If CONCAT doesn't support ranges as arguments in LibreOffice Calc (which it doesn't), use the CONCATENATE function combined with TEXTJOIN or other methods.
Workaround since CONCAT doesn't accept ranges in Calc:
CONCAT and CONCATENATE work on single cells, not ranges. So to concatenate elements row-wise in array fashion, you can use:
For many rows:
- Use a helper column with:
=A2 & G2
and drag down — but as you've seen, your formula gets pushed down with the data update.
Alternative: Use OFFSET or INDIRECT with array formulas
But this becomes complex.
Best approach in LibreOffice Calc
Because your data imports and pushes down rows, try this:
Use a second column with your formula that "replicates" with rows, but keep it outside the import area
If new data is imported into rows 2+, then your formula column can be placed outside that range (e.g., column J), and then filled with a formula like:
=IF(ISBLANK(A2);""; A2 & G2)
Drag this down enough rows once (e.g., till row 1000).
Now, when new rows are inserted above, this formula "moves down," but:
- You can convert the formulas in column J into an array formula once by selecting the whole column and pressing Ctrl+Shift+Enter with the formula:
=IF(A2:A1000="";"";A2:A1000 & G2:G1000)
You need to test if LibreOffice supports this style; historically, it supports array formulas but with limited functions.
Summary Recommendations
-
Import your data in A1:Hn as usual.
-
In column J, write the formula for the first row (J2):
=IF(A2="","",A2 & G2)
-
Drag this formula down manually far enough (e.g., 1000 rows) once.
-
After each import update, the formula is pushed down but remains in place.
-
If formulas are lost or pushed down incorrectly after import:
- Use a macro/script to re-fill the formula after each update.
Bonus: Macro snippet to refill formulas
If you want, I can help you create a simple LibreOffice Basic macro that after data refresh copies the formula down for you automatically.
TL;DR
- No
ARRAYFORMULA in LibreOffice Calc.
- Use normal formulas like
=A2 & G2 dragged down.
- If import pushes formulas down and breaks references, consider a macro to restore formulas.
- Or put formula in separate sheet/column to avoid being pushed.
If you want, I can help you with the macro or more details!