Using LEFT to extract text, then applying wildcard to the result to do a COUNTIF

danielsan210684

New Member
Joined
Aug 9, 2018
Messages
2
Hi all, I have the results of a survey which allows people to free-type their answers. I have cleaned the answers up however there are a litany of spelling errors for many of the same words.

I need to count the instances of these answers, including the misspelled words. I have a list of the correct spellings and using the COUNTIF and LEFT function I am extracting the first 5 letters from each correct spelling and counting the instances in the original list of answers.

However, I need to apply the wildcard "*" function to the five letters the LEFT formula extracts so the COUNTIF will pick up correctly, incorrectly and expanded versions of answers.

Currently I have the below formula:

=COUNTIF($A$3:$A$6001,LEFT(B3,5))

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Protectng[/TD]
[TD="align: center"]Protecting[/TD]
[TD="align: center"]=COUNTIF($A$2:$A$6001,LEFT(B2,5))[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Conservtion[/TD]
[TD]Conservation[/TD]
[TD="align: center"]=COUNTIF($A$3:$A$6001,LEFT(B3
,5))​
[/TD]
[/TR]
</tbody>[/TABLE]

How do I get it so the COUNTIF applies the wildcard and count all of the relevant words in column A?

Any help would be massively appreciated!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Does adding what I show in red above do what you want?

Hi, thanks for this. I figured it out shortly after I posted with the exact same solution you provided! Really appreciate your response (would have replied sooner but I've been off work since Friday, sorry for the delay). It always seems to be the simple things that trip me up.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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