combining columns

bobsakamato

New Member
Joined
Apr 15, 2008
Messages
10
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.

Many thanks in advance,
Rob
 
Last edited:

Excel Facts

Shade all formula cells
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 your column A Range
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,
 
Upvote 0
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.
 
Upvote 0

Forum statistics

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