Formula

S

Steve Cohen

I'm trying to figure out a formula that will take anything in colume F if it
has Deposit or Bonus in the cell and add the adjacent cells from colum A
together.

For example F1, F5 and F30 meet the critiria of having "Deposit" or "Bonus"
in the cells. I want to be able to the the dollar amount in cells A1, A5 and
A30 (EX: $150, $75 and $300) and add them together to give me the total (EX:
$525)

Thank you;

Steve
 
D

Dan E

Steve

Assuming that your cells in F contain only Deposit or Bonus
=SUM(SUMIF(F:F,{"Deposit","Bonus"},A:A))
If they could contain other things like "Term Deposit" or
"Performance Bonus"
=SUM(SUMIF(F:F,{"*Deposit*","*Bonus*"},A:A))

Or for a particular range
=SUM(SUMIF(F1:F100,{"Deposit","Bonus"},A1:A100))

Dan E
 
R

Robert Rosenberg

An alternative:

=SUM((F1:F30="bonus")*(A1:A30),(F1:F30="deposit")*(A1:A30))

Press Ctrl + Shift + Enter when entering this formula. This enters the
formula as an array, which allows the multiple cell comparison to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top