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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,358
Office Version
  1. 365
Platform
  1. Windows
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,191,701
Messages
5,988,176
Members
440,135
Latest member
DCDavid

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
Top