[Solved] Combine multiple sheets into one

Discuss the spreadsheet application
Locked
cephas
Posts: 41
Joined: Sat Aug 30, 2014 3:40 am
Location: Queensland, Australia

[Solved] Combine multiple sheets into one

Post by cephas »

The topic at viewtopic.php?p=550023#p550023 , helped a lot, and I have been using it for a while now. It helps with 'cash flow' on several accounts. One sheet per account.

Is there a method to combine 5 sheets into one sheet, so that I can see an overall cash flow for all the accounts ? Plus not have to maintain the combined sheet, as it will be just a 'view' of the other 5 sheets.
Last edited by cephas on Sun Sep 06, 2026 5:45 am, edited 1 time in total.
LibreOffice Version: 25.8.7.3 on Kubuntu 25.10.1
User avatar
karolus
Volunteer
Posts: 1252
Joined: Sat Jul 02, 2011 9:47 am

Re: Combining multiple sheets into one sheet

Post by karolus »

probably:

Code: Select all

=VSTACK(FILTER( source1; …); FILTER(source2; … ); ectpp )
Libreoffice 25.2… on Debian 13 (trixie) (on RaspberryPI5)
Libreoffice 25.8… flatpak on Debian 13 (trixie) (on RaspberryPI5)
cephas
Posts: 41
Joined: Sat Aug 30, 2014 3:40 am
Location: Queensland, Australia

Re: Combining multiple sheets into one sheet

Post by cephas »

karolus wrote: Fri Sep 04, 2026 6:44 am probably:

Code: Select all

=VSTACK(FILTER( source1; …); FILTER(source2; … ); ectpp )
Thanks. No matter what I tried (making sure the sheet name was correct), I got a #NAME? msg. Then tried another format

Code: Select all

=SUM(Budget.A1:CashAccount.D171)
but got a #REF! message.
LibreOffice Version: 25.8.7.3 on Kubuntu 25.10.1
User avatar
MrProgrammer
Moderator
Posts: 5480
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Combining multiple sheets into one sheet

Post by MrProgrammer »

cephas wrote: Fri Sep 04, 2026 4:59 am Is there a method to combine 5 sheets into one sheet, so that I can see an overall cash flow for all the accounts ? Plus not have to maintain the combined sheet, as it will be just a 'view' of the other 5 sheets.
As explained in hundreds of topics, this is the wrong approach for Calc. To take advantage of the features in Calc, put all the accounts in one sheet, adding a column to the sheet which provides the account. Then you can view a specific account with Data → Filter, and all accounts with Data → Filter → Remove Filter. With a single sheet you can use a pivot table to summarize the data by account or by date. Just refresh the pivot table to update the summary if you change your data.

LibreOffice seems to have some new VSTACK voodoo to combine sheets, but personally I would use the tried and true method of combining the data once and deleting the per-account sheets. There are macros which help combine large numbers of sheets, but for five it will be far easier to do that manually with cut/paste. Before making major structural changes to your data make a backup of your spreadsheet file now in case you need to start over.

cephas wrote: Fri Sep 04, 2026 9:48 am Then tried another format … but got a #REF! message.
No one can help since we can't see your data and layout. If you need any additional assistance attach a spreadsheet demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document. I'll ignore a picture.

[Tutorial] Ten concepts that every Calc user should know

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
cephas
Posts: 41
Joined: Sat Aug 30, 2014 3:40 am
Location: Queensland, Australia

Re: Combining multiple sheets into one sheet

Post by cephas »

@MrProgrammer - thanks for your reply.

Your filter approach looks promising. Is there a method/s to do this:

* ALL transactions for ALL accounts in one sheet. Each row will have the account number (5 accounts in all)
* Add 5 sperate sheets - each one will dynamically filter for THAT specific account number.

That way I only maintain one sheet, and then have the ability to view each individual account via the other 5 sheets.
LibreOffice Version: 25.8.7.3 on Kubuntu 25.10.1
User avatar
robleyd
Moderator
Posts: 5536
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Combining multiple sheets into one sheet

Post by robleyd »

As MrProgrammer suggests, use pivot tables to see details of separate accounts on separate sheets.
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.17
LibreOffice 26.8.1.1; SlackBuild for 26.8.1 by Eric Hameleers
-----------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
User avatar
MrProgrammer
Moderator
Posts: 5480
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Combining multiple sheets into one sheet

Post by MrProgrammer »

cephas wrote: Sat Sep 05, 2026 9:27 am Is there a method/s to … add 5 separate sheets [to] dynamically filter for that specific account number?
Yes, but it is far simpler to use Data → Filter. The Calc Guide and the online help both explain how to use filters if this important feature is new to you.
[Tutorial] Sorting and Filtering data with formulas

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
cephas
Posts: 41
Joined: Sat Aug 30, 2014 3:40 am
Location: Queensland, Australia

Re: Combining multiple sheets into one sheet

Post by cephas »

Thanks eeveryone for your replies. Looks like the best/easiest method is to have all the transactions for all accounts in one sheet, and then use a filter.
LibreOffice Version: 25.8.7.3 on Kubuntu 25.10.1
Locked