# How to sum data from 2 tables for unique ID number

#### Josu

##### New Member
Hello guys I am using Excel 2010
I have big need at work to figure out how I can quickly sum data from 2 tables
As example i have 2 tables with data for each ID - let say it's customer, and for each customer i have number of units ordered, is it any easy way to sum that numbers?
Issue is that often i don't have customer from Table B in Table A, but all data basically need to be summed in Table A.
Tables are looking like this:
Table A
Customer Pens Pencils Staples
555 5 4 3
556 5 4 3
557 5 4 3
558 5 4 3

Table B
Customer Pens Pencils Staples
555 5 4 3
557 5 4 3
559 5 4 3

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### jtakw

##### Well-known Member
Hi,

This is one way:

Book3.xlsx
ABCDEF
1Table ATotal Units
255554324
355654312
455754324
555854312
6
7
8Table B
9555543
10557543
11559543
Sheet815
Cell Formulas
RangeFormula
F2:F5F2=SUMPRODUCT((A\$2:A\$5=A2)*B\$2:D\$5)+SUMPRODUCT((A\$9:A\$11=A2)*B\$9:D\$11)

#### Josu

##### New Member
Man, you amazing, thanks for the formula i almost made very useful tool for me, now need to look for more formulas in google

#### jtakw

##### Well-known Member
You're welcome, thanks for the feedback.

Replies
4
Views
65
Replies
6
Views
50
Replies
1
Views
89
Replies
1
Views
70
Replies
4
Views
108

1,136,643
Messages
5,676,965
Members
419,665
Latest member
allsmilees2

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