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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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