Help needed to get values from different sheet and sum if the value in one column matches

szpt9m

Board Regular
Joined
Feb 24, 2013
Messages
53
Hi All,
I have a workbook with 3 sheets each having 2 columns!

Rich (BB code):
Sheet1:

[TABLE="width: 128"]
<TBODY>[TR]
[TD]Col-A</SPAN>[/TD]
[TD]Col-B</SPAN>[/TD]
[/TR]
[TR]
[TD="align: right"]3245688</SPAN>[/TD]
[TD="align: right"]12</SPAN>[/TD]
[/TR]
[TR]
[TD="align: right"]4567893</SPAN>[/TD]
[TD="align: right"]13.5</SPAN>[/TD]
[/TR]
[TR]
[TD="align: right"]1342567</SPAN>[/TD]
[TD="align: right"]15</SPAN>[/TD]
[/TR]
</TBODY><COLGROUP><COL span=2></COLGROUP>[/TABLE]


Sheet2:

[TABLE="width: 96"]
<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>[TR]
[TD="width: 64, bgcolor: transparent"]Col-A[/TD]
[TD="width: 64, bgcolor: transparent"]Col-B[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3245688[/TD]
[TD="bgcolor: transparent, align: right"]13.7[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]2139475[/TD]
[TD="bgcolor: transparent, align: right"]45[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]9875768[/TD]
[TD="bgcolor: transparent, align: right"]23[/TD]
[/TR]
</TBODY>[/TABLE]

Sheet3:

[TABLE="width: 96"]
<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>[TR]
[TD="width: 64, bgcolor: transparent"]Col-A[/TD]
[TD="width: 64, bgcolor: transparent"]Col-B[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]142234[/TD]
[TD="bgcolor: transparent, align: right"]23[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]24563[/TD]
[TD="bgcolor: transparent, align: right"]56[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]156789[/TD]
[TD="bgcolor: transparent, align: right"]13.2[/TD]
[/TR]
</TBODY>[/TABLE]

Now i need to search in all 3 sheets, if column A value of one sheet matches with another sheet, then i need to sum the values in column B. if it doesnot matches then i just need take those values and put it in my resultant sheet.
so the result from the above example will be as below:
Rich (BB code):
  [TABLE="width: 96"]
<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>[TR]
[TD="width: 64, bgcolor: transparent"]Col-A[/TD]
[TD="width: 64, bgcolor: transparent"]Col-B[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3245688[/TD]
[TD="bgcolor: transparent, align: right"]25.7[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4567893[/TD]
[TD="bgcolor: transparent, align: right"]13.5[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]1342567[/TD]
[TD="bgcolor: transparent, align: right"]15[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]2139475[/TD]
[TD="bgcolor: transparent, align: right"]45[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]9875768[/TD]
[TD="bgcolor: transparent, align: right"]23[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]142234[/TD]
[TD="bgcolor: transparent, align: right"]23[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]24563[/TD]
[TD="bgcolor: transparent, align: right"]56[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]156789[/TD]
[TD="bgcolor: transparent, align: right"]13.2[/TD]
[/TR]
</TBODY>[/TABLE]
Since here the first value in column A of sheet 1 matches with that of sheet 2, the values in column B is summed up.. all other values are placed as it is..
Thank you,
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,231
Messages
6,170,884
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