Help with an array that requires "and" + "or"

Rowey

Board Regular
Joined
Feb 11, 2011
Messages
60
Hi, I am trying to create an array formula that does the following:

Counts the number of times "Expression of wish" appears in 1 column and then "p" or "f" appears in another.

So if I get Expression of wish appearing and P it will count it

If in another row Expression of wish appears and F appears it will also count it

This is as far as I have got, can anybody help?

=SUM((January!B2:B3="expression of wish")*(January!F2:F3="p"))
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Welcome to the Board!

Try:

=SUM((January!B2:B3="expression of wish")*((January!F2:F3="p")+(January!F2:F3="f")))

This needs to be entered with control+shift+enter and not just enter.

Hope that helps.
 
Upvote 0
Welcome to the board.

=SUMPRODUCT(--(January!B2:B3="Expression of wish"),--(ISNUMBER(MATCH(January!F2:F3,{"p","f"},0))))
 
Upvote 0
Would any instance of "Expression of wish" and P or F always occur on the same row? ie A1 and B1
Excel Workbook
ABC
12
2
3Expression of wishF
4
5
6
7Expression of wishP
8
9
10
11
12
13Expression of wishz
Sheet3
Excel 2010
Cell Formulas
RangeFormula
C1=COUNTIFS($A$1:$A$13,"Expression of wish",B1:B13,"p")+COUNTIFS($A$1:$A$13,"Expression of wish",B1:B13,"f")
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top