Excel formula count occurances

Biz

Well-known Member
Joined
May 18, 2009
Messages
1,773
Office Version
  1. 2021
Platform
  1. Windows
Dear All,

I'm trying to construct formulas in Col G which matches Col H.
My criteria to add matches in a string is located in cell M2.

Your help would be greatly appreciated.

Kind Regards


Biz



Excel 2013 32 bit
BCDEFGHIJKLM
1
NameCategoryMonthStringCalShould BeCriteria
2
TomRespite
1/11/2016​
Respond,Other,Reassessed
0​
3​
Respond,Other,Reassessed
3
TomOther
1/11/2016​
Respond,Other,Reassessed
0​
3​
4
TomReassessed
1/11/2016​
Respond,Other,Reassessed
0​
3​
5
BKRespite
1/12/2016​
Respond
1​
1​
6
TomOther
1/12/2016​
Other,Other
0​
2​
7
TomOther
1/12/2016​
Other,Other
0​
2​
8
SpiderA
1/12/2016​
A
0​
0​

<tbody>
</tbody>
Sheet: Sheet2

<tbody>
</tbody>

Excel 2013 32 bit
BCDEFGHIJKLM
1NameCategoryMonthStringCalShould BeCriteria
2TomRespite1/11/2016Respond,Other,Reassessed03Respond,Other,Reassessed
3TomOther1/11/2016Respond,Other,Reassessed03
4TomReassessed1/11/2016Respond,Other,Reassessed03
5BKRespite1/12/2016Respond11
6TomOther1/12/2016Other,Other02
7TomOther1/12/2016Other,Other02
8SpiderA1/12/2016A00

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
G2= SUMPRODUCT(--ISNUMBER( SEARCH("," & E2 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G3= SUMPRODUCT(--ISNUMBER( SEARCH("," & E3 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G4= SUMPRODUCT(--ISNUMBER( SEARCH("," & E4 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G5= SUMPRODUCT(--ISNUMBER( SEARCH("," & E5 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G6= SUMPRODUCT(--ISNUMBER( SEARCH("," & E6 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G7= SUMPRODUCT(--ISNUMBER( SEARCH("," & E7 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))
G8= SUMPRODUCT(--ISNUMBER( SEARCH("," & E8 & ",","," &SUBSTITUTE(TRIM($M$2),",",", ") & ",")))


<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Sorry mate you are right it's my error.
Have Happy Xmas and Happy New Year.

Biz
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,215,432
Messages
6,124,859
Members
449,194
Latest member
HellScout

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