combining columns

bobsakamato

New Member
Hello,

Like everyone that posts I looked through all the "combining" posts and found many close examples but not exactly my conditions.

Any help will be greatly appreciated. This is a rather large file so I tried IF statements and that kind of worked, I know there is a better/easier way to accomplish this.

Examples are usually cleaner:

<style></style>This is a 2 column sheet. In column A (the identifier) Col B ( total cost) I am using column headings

What I would like to do is: If a like item is in col A add the two costs, if not bring over cost.

Col A Col B Col C Col D

2 15000.00 2 40000.00
2 25000.00 3 5587.55
3 5587.65 4 35000.25
4 10000.25 5 25555.25
4 25000.00 7 105000.25
5 25555.25
7 40000.25
7 65000.00

This board is awesome and extremely helpful.

Rob

Last edited:

Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I have a couple of thoughts on this one.
The easiest way is SUMIF

If you know the numbers that you have in Column C, then create that list
If Cell C3 is the number 2, in D3, enter the formula
=sumif(\$A\$2:\$A\$1000,C3,\$B\$2:\$B\$1000) and copy your formula down

Now if the list you have is much larger and you need to extract the unique values first,

Select Data - Filter - Advanced Filter
Select `Copy to Another Location`
Check Ùnique records only`
and in Copy to select where you want the list.
then use the Sumif formula at the top of this post.

I hope that helps,

Thanks so much for the help braindiesel.

The filter idea you posted worked great. However the sumif does not. Its close I know it.

To recap. Column A is the identifier, col b is the cost. Now in col D i have unique identifiers, however I need to now add in col e, sums of any costs (col B) that have matching identifiers in col a. If there is no match in col A than simply bring over the corresponding cost in col B.

When I copied in your formula I get a return of "0". I am not getting an error or anything but the answer should be 17150, which is the sum of b2 and b3 since there is match in col a.

col a looks like this:
2
2
3
4
4
5
6
6
7

col b like this:
17000
150
3000
2000
5000

Any help is greatly appreciated.

User error. It worked great/

THANKS!!!!

Replies
1
Views
893
Replies
3
Views
485
Replies
9
Views
566
Replies
8
Views
770
Replies
2
Views
1K

1,203,218
Messages
6,054,210
Members
444,710
Latest member
napster91192

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.

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