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

#### Kmcbrine

##### New Member
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

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)

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?

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.

Replies
1
Views
89
Replies
1
Views
368
Replies
20
Views
930
Replies
9
Views
334
Replies
0
Views
473

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.

### Which adblocker are you using?

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