# Merge and Sum Tables

#### HamishM

##### New Member
Hi,

I have two tables which get created several times per month.

I would like to be able to merge all entries in the two tables and if there are duplicate items in Col A then sum the value in Col B

e.g

Table 1:
Supplier Weight
Tim 5
Tom 7

Table 2:
Supplier Weight
John 4
Dave 3
Sarah 9
Tom 2

Merged Table:
Supplier Weight
Tim 5
Tom 9
John 4
Dave 3
Sarah 9

I have no problem using a macro or formula.

Hamish

### Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi:

Have you consiodered the pivot table approach?

plettieri

Hi...

something like this..
Book1
EFGHIJ
8nameamtnameamt
9Tim5John4
10Tom7Dave3
12Tom2
13
14
15
16Page1(All)
17
18Sum of ValueColumn
19Rowamt
21Dave3
22John4
23Sarah9
24Tim5
25Tom9
26Grand Total33
27
Sheet1

plettieri

Thanks - that looks ideal.

I've not used pivot tables before, but have just attempted to recreate what you have - and failed. Can you take me through the steps you used please.

thanks
Hamish

Hi:

Using the Pivot table wizard....DATA |PIVOT TABLE gets you started ...choosing "multiple consolidation ranges" button...and following the instructions from there..

post back if you more needed and or your results.

hope this helps

plettieri

Ok...

i can get that far and recreate the table - however all the numbers are wrong. Every single cell in the table contains a 2 for some reason.

The original tables have one Col (A) of Names, and then two Cols (B0 (C) - where B is qty in lbs, and C is amount in \$. Obvioiusly B, C don't need to sum.

help!

All sorted now

Replies
10
Views
176
Replies
3
Views
102
Replies
4
Views
233
Replies
2
Views
679
Replies
0
Views
108

1,203,242
Messages
6,054,345
Members
444,717
Latest member
melindanegron

### 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.

### Which adblocker are you using?

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

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