count how many times text string appears in column

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,042
Office Version
  1. 365
Platform
  1. Windows
i am using if/countifs to test for the existence of particular strings of characters (company names) within a column on another tab.

my source sheet contains company names in column B and today's date at O1. The Contract Extract tab contains Company names in Col E and Dates in Col F. so, if the string in col B matches one of the companies in Col E on the Contracts Extract tab, and the date in Col F is greater than O1 on the source sheet, give me a yes. this is my formula:

IF(COUNTIFS('Contract Extract'!$E:$E,B5,'Contract Extract'!$F:$F,">"&$O$1)>=1,"Y","N")

in the list of companies in Col E of Contract Extract, there are several entries containing multiple companies (where there has been a consortium of bidders for eg). I need the formula to be able to count those instances also. the formula above, which i thought should do that, does not.

using consulting firms as an example. say i am looking for PricewaterhouseCoopers. the list of company names includes an entry for "KPMG, [Various - Parent Contract], PricewaterhouseCoopers, Grant Thornton Australia Ltd, PKF Brisbane Audit, BSI Group ANZ Pty Limited"

my current formula does not count this as a match. what can i use instead?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hello, try to use COUNTIFS with wildcards:

Excel Formula:
IF(COUNTIFS('Contract Extract'!$E:$E,"*"&B5&"*",'Contract Extract'!$F:$F,">"&$O$1)>=1,"Y","N")
 
Upvote 1
Solution

Forum statistics

Threads
1,221,417
Messages
6,159,789
Members
451,589
Latest member
Harold14

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