Data from two tables to make a third table

Cyankee

New Member
Joined
Nov 20, 2011
Messages
28
I have two tables that have deposit information. One table, every entry is a deposit, the other table has a deposit every few entries. I would like to combine just the deposit dates and deposit amounts into a single table.

Will try and tackle today, but would appreciate some help.

EX: First table is all deposit, second table, the deposits are negative. Would like to combine only the deposits into a third table (Converting the neg numbers to positive)

[TABLE="width: 482"]
<colgroup><col><col span="3"><col><col><col></colgroup><tbody>[TR]
[TD]Table one[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Table two[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Desciption[/TD]
[TD]Amount[/TD]
[TD][/TD]
[TD]Date[/TD]
[TD]Desciption[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.45[/TD]
[TD][/TD]
[TD="align: right"]1/1/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.62[/TD]
[/TR]
[TR]
[TD="align: right"]1/2/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.55[/TD]
[TD][/TD]
[TD="align: right"]1/2/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.98[/TD]
[/TR]
[TR]
[TD="align: right"]1/3/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.80[/TD]
[TD][/TD]
[TD="align: right"]1/3/2014[/TD]
[TD]Depost[/TD]
[TD="align: right"]-1.60[/TD]
[/TR]
[TR]
[TD="align: right"]1/4/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.47[/TD]
[TD][/TD]
[TD="align: right"]1/4/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.46[/TD]
[/TR]
[TR]
[TD="align: right"]1/5/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.22[/TD]
[TD][/TD]
[TD="align: right"]1/5/2014[/TD]
[TD]Depost[/TD]
[TD="align: right"]-0.46[/TD]
[/TR]
[TR]
[TD="align: right"]1/6/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.23[/TD]
[TD][/TD]
[TD="align: right"]1/6/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.42[/TD]
[/TR]
[TR]
[TD="align: right"]1/7/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.41[/TD]
[TD][/TD]
[TD="align: right"]1/7/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.03[/TD]
[/TR]
[TR]
[TD="align: right"]1/8/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.54[/TD]
[TD][/TD]
[TD="align: right"]1/8/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.45[/TD]
[/TR]
[TR]
[TD="align: right"]1/9/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.81[/TD]
[TD][/TD]
[TD="align: right"]1/9/2014[/TD]
[TD]Depost[/TD]
[TD="align: right"]-0.90[/TD]
[/TR]
[TR]
[TD="align: right"]1/10/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.79[/TD]
[TD][/TD]
[TD="align: right"]1/10/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.51[/TD]
[/TR]
[TR]
[TD="align: right"]1/11/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.85[/TD]
[TD][/TD]
[TD="align: right"]1/11/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.07[/TD]
[/TR]
[TR]
[TD="align: right"]1/12/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.48[/TD]
[TD][/TD]
[TD="align: right"]1/12/2014[/TD]
[TD]Depost[/TD]
[TD="align: right"]-0.58[/TD]
[/TR]
[TR]
[TD="align: right"]1/13/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.24[/TD]
[TD][/TD]
[TD="align: right"]1/13/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.02[/TD]
[/TR]
[TR]
[TD="align: right"]1/14/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.33[/TD]
[TD][/TD]
[TD="align: right"]1/14/2014[/TD]
[TD]Work created[/TD]
[TD="align: right"]0.05[/TD]
[/TR]
[TR]
[TD="align: right"]1/15/2014[/TD]
[TD]Deposit[/TD]
[TD="align: right"]0.42[/TD]
[TD][/TD]
[TD="align: right"]1/15/2014[/TD]
[TD]Depost[/TD]
[TD="align: right"]-0.07[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Forgot to add, in my real world case, the tables are NOT equal in size. One is short and smaller then the other,
 
Upvote 0
hi

Save the file. For ease of explanation (but it isn't the only way), I'll assume each table has a normal (non-dynamic) named range - 'Table1' and 'Table2'.

ALT-D-D-N and follow the wizard to the end choosing the option to edit in MS Query. Via the SQL button edit the SQL to be
Code:
SELECT *
FROM Table1
UNION ALL
SELECT T.[Date], T.Description, -1*T.Amount
FROM Table2 T
WHERE T.Description = 'Deposit'
Note spellings of Description & Deposit are corrected from the sample data posted in initial post. OK to enter SQL, OK to any messages, see dataset, via 'open door' icon exit MS Query & populate results to a worksheet.

If required, this can be refreshed in the future (when source data changes). ALT-D-R or alternative.

regards
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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