akjollerstrom
New Member
- Joined
- May 7, 2012
- Messages
- 1
Hi
I'm developing a budget template where each user is to make two identical lists with different data: expenses and income. They both have the headings
Organisational unit
project
account
amount
pretty straight forward...
What I need to do is make the template automatically consolidate/merge/union these two lists into one, at most at a button click from the user.
The consolidate function under the Data tab doesn't quite get it right since it will not include rows that are added to the source once applied (and there can be any number of lines in the list)
I can make a pivot with two sources and it will include everything, provided i concatenate the three first columns, but I would then have to extract it from the pivot in a way that doesn't seem right.
I'm assuming that the way to go would be to add some code along the lines of
Select sheet1!A:D
Union
Select sheet2!A:D
and then insert this in a new sheet.
But I can't find anywhere that this is applied within a workbook. I could find some examples of how this is done using external data, there is even a nifty wizard for this, but I couldn't find anything showing how to do this within one workbook.
Anyone with an idea how to fix this?
Thanks
Anders
I'm developing a budget template where each user is to make two identical lists with different data: expenses and income. They both have the headings
Organisational unit
project
account
amount
pretty straight forward...
What I need to do is make the template automatically consolidate/merge/union these two lists into one, at most at a button click from the user.
The consolidate function under the Data tab doesn't quite get it right since it will not include rows that are added to the source once applied (and there can be any number of lines in the list)
I can make a pivot with two sources and it will include everything, provided i concatenate the three first columns, but I would then have to extract it from the pivot in a way that doesn't seem right.
I'm assuming that the way to go would be to add some code along the lines of
Select sheet1!A:D
Union
Select sheet2!A:D
and then insert this in a new sheet.
But I can't find anywhere that this is applied within a workbook. I could find some examples of how this is done using external data, there is even a nifty wizard for this, but I couldn't find anything showing how to do this within one workbook.
Anyone with an idea how to fix this?
Thanks
Anders