Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help with IF Formula
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help with IF Formula
Try this:
=Sumproduct((a1:a100="F")*(B1:B100="Apple")) -- HTH, RD ================================================== === Please keep all correspondence within the Group, so all may benefit! ================================================== === "Fgbdrum" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help with IF Formula
=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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Fgbdrum" wrote in message ... 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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help with IF Formula
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 On Jun 17, 4:11*pm, Fgbdrum wrote: 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. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help with IF Formula
Hi,
try =SUMPRODUCT(--(B1:B300="Apple"),--(A1:A300="F")) "Fgbdrum" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|