Need Help Gang!!!

Evagrius Ponticus

Well-known Member
Joined
May 24, 2007
Messages
1,467
I need help please. I have a column of data and I am trying to use the counfif function to count the accurances of a certain string using a cell reference but I can't get it to work. Here is what I mean


a-01 a-01tx1111
a-02tx21212t
a-03tx1111

Now, assume that the a-01 to the far left is in cell A1, and I am trying to count the occurances of that string in the column above using cell A1 as a reference. here is what I did

=countif(range,left(A1,4)="a-01")

what am I doing wrong guys? I keep getting a zero.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Sorry but that doesn't really make much sense.:eek:

If you wanted to use COUNTIF with a cell reference it would be more like this.

=COUNTIF(B1:B10, A1)

And since you are only looking for a partial match it might look more like this.

=COUNTIF(B1:B10, "*" & A1 & "*")
 
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,803
Members
449,337
Latest member
BBV123

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