Formula for multiple cells if they say a certain thing

T

texansgal

I am looking for a formula where one cell will equal the total of mutiple
cells IF the cells say a different thing.

Example:

Column A has the Description "PUR" or "SK"
Column B has the Description "HY" or "CBN"
Column C has the total of that row (manually entered)

I want the total amount from col C to be all of the "PUR" or "SK" of "HY" or
"CBN"

So it would be IF cell A has PUR and cell B has HY then the amount in column
C for those will be totaled here. And so on as there could be 4 different
ways since it could be "PUR" of "HY", "PUR" of "CBN" or "SK" of "HY", "SK" of
"CBN".

Does this make any sense? It is hard to explain.
 
R

Rick Rothstein

I'm not sure from your description what it is your are totaling up...
Numbers from another column when Column A and Column B are one of your
indicated combinations? Or the number of times a certain combination
appears? Is there a way you indicate which combination you want to do your
total for?
 
S

Sheeloo

=SUMPRODUCT(--(A1:A100="PUR"),--(B1:B100="HY"),(C1:C100))
(after changing 100 to your last row) will give you the Sum of Col C where
corresponding row in Col A has PUR and Col B has HY

By changing PUR to HY and/or SK to CBN you will get all four combinations..
 
T

texansgal

I knew I was confusing in what I was saying...lol

I have 3 columns that I want to base the total on. The amount in column C is
for the total of the Order (which is manually entered).

I have a total for items broken down at the bottom of the page. We want to
see what is selling better and if we are purchasing it elsewhere or if we
have this in stock.

I want anything that is SK and HY to be totaled in one cell for SK HY
I want anything that is SK and CBN to be totaled in one cell for SK CBN
I want anything that is PUR and HY to be totaled in one cell for PUR HY
I want anything that is PUR and CBN to be totaled in one cell for PUR CBN

I would like to have one general formula for each of the totals in the
bottom. I know there is something where I can have "if" it is "sk" in column
A and "hy" in column B, the total in column C will equal this amount.

Am I confusing you more?
 

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