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

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td]
8/1/17​
[/td][td]RED, BLUE[/td][td]RED[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
8/1/17​
[/td][td]RED, WHITE[/td][td]WHITE[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
8/1/17​
[/td][td]BLUE, WHITE[/td][td]BLUE[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
8/1/17​
[/td][td]YELLOW[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
4/1/17​
[/td][td]YELLOW[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
4/1/17​
[/td][td]BLUE[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
4/1/17​
[/td][td]WHITE, RED[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
4/1/17​
[/td][td]YELLOW, WHITE[/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet1[/td][/tr][/table]
 
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.

Sorry, I'm viewing this on a phone, but IT WORKS!!! Holy cow thanks. This has been stumping me for a while.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,830
Messages
6,181,228
Members
453,025
Latest member
Hannah_Pham93

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