Help finding a value in one column and showing the value of adjacent cell

acollier21

New Member
Joined
Oct 13, 2010
Messages
7
I need some help with a formula. I want to excel to find a certain value (which may occur several times in a column) and add up the values that are next to those specific cells. For instance:

A 1
B 2
A 4
A 5
B 3
C 3
C 2
D 5

I want to create a formula to find all the "A" values and add up all the numbers next to it (1+4+5) and show the added value (10).

Thanks in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I need some help with a formula. I want to excel to find a certain value (which may occur several times in a column) and add up the values that are next to those specific cells. For instance:

A 1
B 2
A 4
A 5
B 3
C 3
C 2
D 5

I want to create a formula to find all the "A" values and add up all the numbers next to it (1+4+5) and show the added value (10).

Thanks in advance.

Maybe:

=SUMIF(A1:A8,"A",B1:B8)
 
Upvote 0
That's it? You've gotta be kidding me.....

You wouldn't believe the work I've gone through and what I looked into to find that information. I finally found something that worked.....

Since most of my data only had two values to add up......

=IFERROR(INDEX($C$11:$D$47,SMALL(IF($D$11:$D$47=$AB3,ROW($D$11:$D$47)),ROW($1:$1))-10,1),0)
This found the first value

=IFERROR(INDEX($C$11:$D$47,LARGE(IF($D$11:$D$47=$AB3,ROW($D$11:$D$47)),ROW($1:$1))-10,1),0)
This found the second value

If they were the same value then I created this.....
=IFERROR(IF(LARGE(IF($D$11:$D$47=$AB3,ROW($D$11:$D$47)),ROW($1:$1))=SMALL(IF($D$11:$D$47=$AB3,ROW($D$11:$D$47)),ROW($1:$1)),"void",""),"")
This would pull up something I could use so that I made sure I didn't add up the same number

=IF(AE3="void",AC3,SUM(AC3:AD3))



It's nice to know that all of this solved with SUMIF.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,223
Messages
6,123,715
Members
449,118
Latest member
MichealRed

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