Need help with IF Formula

F

Fgbdrum

Hi-

In principal, I'd like to do a COUNTIF statement within an IF statement.
Can't seem to get it to work just right. Here's my sheet:

Column A Column B
A APPLE
B ORANGE
F APPLE

I'd like the formula to say:

If column B equals APPLE, count column A if it equals F.

This would give me a return of 1.

Would appreciate any help on this. Thank you.
 
R

RagDyeR

Try this:

=Sumproduct((a1:a100="F")*(B1:B100="Apple"))
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


Hi-

In principal, I'd like to do a COUNTIF statement within an IF statement.
Can't seem to get it to work just right. Here's my sheet:

Column A Column B
A APPLE
B ORANGE
F APPLE

I'd like the formula to say:

If column B equals APPLE, count column A if it equals F.

This would give me a return of 1.

Would appreciate any help on this. Thank you.
 
B

Bernard Liengme

=SUMPRODUCT(--(B1:B100="Apple"),--(A1:A100="F"))
If you are using Excel 2007
=SUMPRODUCT(--(B:B="Apple"),--(A:A="F"))
or
=COUNTIFS(A:A,"F",B:B,"Apple")
best wishes
 
P

Pete_UK

Try this:

=SUMPRODUCT((B$1:B$20="Apple")*(A$1:A$20="F"))

You could put Apple and F into some other cells, and then refer to
those cells in the formula rather than the specific values.

Hope this helps.

Pete
 

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