Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex Excel Formula/Problem Help Please

Status
Not open for further replies.

Proxemic

Technical User
Dec 14, 2006
4
0
0
GB
Hi

I have a worksheet containing a number of columns
One column contains a series of 4 digit numbers, and a 2 columns to the right contains a value
I need to add only values which match the same 4 digit numbers to a separate location
For example:
Col A Col C
2101 45.40
2100 32.00
2104 10.00
2100 20.00
2101 3.00

Result = Target no Total value
2101 48.40
2100 52.00
2104 10.00

I can get to the point where only the right result is returned for one row ie: =if(colA=SameAsTargetNo,+colC,+0)but what I can't figure out is how to then go down the column and add in (or not add in) subsequent Total Values? I can email over a sample if this would make it a bit clearer?

Any help would be appreciated
Thanks
Proxemic [3eyes]
 
Hey - reading the post about 3 items down, helped me fix this, the solution is

=sumif(ColA,TargetNo,ColC)

Thanks so much, have been scratching my head for days!
[3eyes]
 
You can use Pivot Table to get the result you want - that way unique Col As go in the row heading and it can sum Col C for you.
 
I don't think a pivot table would be a good idea, as it wouldn't return the cell in the list containing Target No - so you'd then have to pull the info from the Pivot Table, I did try that

But thank you - good idea
 
To take the problem a step further - how could I match two columns and return the sum of the values matched in a third, for example

Worksheet1
ColA ColB ColC
91 2100 45.00
120 2105 20.00
91 2100 10.00
125 2100 10.00

Worksheet2
ColM ColN
91 2100 Need a formula here
120 2105 Need a formula here
125 2100 Need a formula here

Thanks [3eyes]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top