Count cells, not occurances, with multiple criteria

SpadeEXE

New Member
Joined
Aug 28, 2017
Messages
6
I'm trying to count the number of cells in column B (B1:B8) that contain one of a couple of words from a list (C1:C3), not occurances. Also, I only want the cells counted if the dates next to them in column A are older than Today()-60. The cells in column B sometimes contain more than one word from the list. I have my formula in C5 and what I've come up with is =COUNTIFS(A1:A8,"<"&TODAY()-60,B1:B8,{"*RED*","*WHITE*","*BLUE*"}), but it's only counting occurances of "*RED*". It counts 1, but I need it to count 3. I'm stuck. I'd like to do this without using a hidden column or cells. Thanks in advance.

Excel 2016 (Mac) 64 bit

8/1/17​
RED, BLUERED
8/1/17​
RED, WHITEWHITE
8/1/17​
BLUE, WHITEBLUE
8/1/17​
YELLOW
4/1/17​
YELLOW
4/1/17​
BLUE
4/1/17​
WHITE, RED
4/1/17​
YELLOW, WHITE
Sheet: Sheet1
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
confirm your formula with shift-control- enter together
 
Upvote 0
I did that and it is unchanged, still counting 1.
There is but 1 record that satisfies both 'contains RED' and < TODAY()-60...
8/1/2017RED, BLUERED 6/30/2017
8/1/2017RED, WHITEWHITE RED
8/1/2017BLUE, WHITEBLUE 1
8/1/2017YELLOW
4/1/2017YELLOW
4/1/2017BLUE
4/1/2017WHITE, RED
4/1/2017YELLOW, WHITE
<colgroup><col><col><col span="3"><col></colgroup><tbody> </tbody>
 
Upvote 0
Maybe this array formula
=SUM(IF(A1:A8 < TODAY()-60,IF(MMULT(--ISNUMBER(SEARCH(TRANSPOSE(C1:C3),B1:B8)),ROW(C1:C3)^0)>0,1)))<today()-60,if(mmult(--isnumber(search(transpose(c1:c3),b1:b8)),row(c1:c3)^0)>
confirmed with Ctrl+Shift+Enter, not just Enter

M.</today()-60,if(mmult(--isnumber(search(transpose(c1:c3),b1:b8)),row(c1:c3)^0)>
 
Last edited:
Upvote 0
Correct, but I want to count how many cells contain either RED, WHITE, or BLUE, and is older than 60 days, not just RED. So it should count A6, A7 once (counting cells, not occurances), and A8. Thanks.
 
Upvote 0
I think I am missing some of your formula.

I edited post #5
Remark: Are you using Mac? I have no experience with Mac. To enter an array formula, *maybe*...
Shift + CMD + Enter
Not sure ...

M.
 
Last edited:
Upvote 0
I edited post #5
Remark: I have no experience with Mac. To enter an array formula, *maybe*...
Shift + CMD + Enter
Not sure ...
M.

That is correct, but your post only has the formula pasted halfway through SEARCH... it ends at "B1:B8" unless I'm missing something. Thanks.
 
Upvote 0
One more time

Array formula
=SUM(IF(A1:A8 < TODAY()-60,IF(MMULT(--ISNUMBER(SEARCH(TRANSPOSE(C1:C3),B1:B8)),ROW(C1:C3)^0)>0,1)))
Ctrl + Shift+ Enter

Mac: Shift+CMD+Enter (not sure)

Can you see the whole formula now?

M.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

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