formula with search for text, if yes, then sum another colum

Kmcbrine

New Member
Joined
Jan 13, 2005
Messages
47
A B C
y $5 dog
y $10 cat
$15 rabbit
y $20 squirrel


so, if column A = "y", then sum all of colmn B where C = dog

I've started with a SUMPRODUCT, but can't finish up.

Any help is much appreciated.

also, how do you attach part of the excel sheet to this forum?

Kerry
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Re: formula with search for text, if yes, then sum another c

Kmcbrine said:
A B C
y $5 dog
y $10 cat
$15 rabbit
y $20 squirrel


so, if column A = "y", then sum all of colmn B where C = dog

I've started with a SUMPRODUCT, but can't finish up.

Any help is much appreciated.

also, how do you attach part of the excel sheet to this forum?

Kerry

Try,

=SUMPRODUCT(--(A2:A100="Y"),--(B2:B100="DOG"),C2:C100)
 
Upvote 0
thanks - I didn't get an error message, but it didn't pick up the dollar amount either (returned $0) The "dog, cat etc" column is validation list - this should not make a difference?
 
Upvote 0
Re: formula with search for text, if yes, then sum another c

Kmcbrine said:
thanks - I didn't get an error message, but it didn't pick up the dollar amount either (returned $0) The "dog, cat etc" column is validation list - this should not make a difference?

Slight variation of the formula I provided. Switch columns B and C, as column B is the range to sum.
 
Upvote 0

Forum statistics

Threads
1,203,321
Messages
6,054,719
Members
444,746
Latest member
Emre06

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