Calc is programmed to do this way. Thus, you can group (via copy and paste) data from ranges that share the same rows or the same columns.
If the content of B1, D1 and E1 are no formulas, you can select from A1 to F1, copy, choose menu
Paste Special -
Paste Special… (the same that
Ctrl+Shift+V), check Formulas and Add, and press
Done with LibreOffice 22.214.171.124 (x86); OS: Windows 6.1.
Add Answer is reserved for solutions.
Press edit below your question if you want to add more information; also can comment an answer.
Check the mark () to the left of the answer that solves your question.