Union of two identical data lists in the same workbook

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
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,164
Messages
6,170,435
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top