COUNTIF match first 10 characters in list

benicholson100

New Member
Joined
Dec 5, 2019
Messages
6
Platform
  1. Windows
Hi,

I have a list of companies that I need to find how many times they occur in another list. The names are not exact so I have been looking to use the SEARCH function based on first 7 characters, however I cannot seem to merge this with a COUNTIF.

Below is one example; the name in List 1 is not the same as List 2 but they are the same company. How would I count how many times this occurs in List 2 by searching the first 10 characters?

Many thanks
Ben


Column / RowABCD
1List 1List 2
2COUNTNames to findNo.Name
3THE ARTIST CLUB LTD1THE ARTIST CLUB
42THE ARTIST CLUB
53THE ARTIST CLUB
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You cant use countif because it expects a range and left(range) isnt a range. Try sumproduct:

=SUMPRODUCT(--(LEFT(D3:D5,10)=LEFT(B3,10)))
 
Upvote 0
I cannot seem to merge this with a COUNTIF
If I have understood correctly, you could have used COUNTIF like this

Book1
ABCD
1List 1List 2
2COUNTNames to findNo.Name
33THE ARTIST CLUB LTD1THE ARTIST CLUB
42THE ARTIST CLUB
53THE ARTIST CLU
Count Partial Match
Cell Formulas
RangeFormula
A3A3=COUNTIF(D3:D5,LEFT(B3,10)&"*")
 
Last edited:
Upvote 0
The asterisk is a wild card, standing for any number of any characters.
So with the example, the formula =COUNTIF(D3:D5,LEFT(B3,10)&"*") becomes

=COUNTIF(D3:D5,"THE ARTIST*")

so it counts anything that starts with "THE ARTIST"
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,753
Members
449,094
Latest member
dsharae57

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