countif criteria format/type question

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to count how many f in this column. if i type =countif(A1:A10,"f") then excel will return 2 but if i type =countif(A1:A10,f) excel will return 0. in the second case, what excel consider F is?
Thank you very much

a
b
b
f
f

<tbody>
</tbody>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If you click on fx next to the formula bar, you will see that the criteria f is returning #NAME?
Help on the countif function says :
[FONT=&quot][FONT=&quot]Problem [/FONT][/FONT]
[FONT=&quot][FONT=&quot] What went wrong[/FONT][/FONT]

<thead style="box-sizing: border-box;">
</thead>
[FONT=&quot]No value returned when you expect a value.[/FONT]
[FONT=&quot]Be sure to enclose the criteria argument in quotes.[/FONT]

<tbody style="box-sizing: border-box;">
</tbody>
 
Upvote 0
.. what excel consider F is?
Excel is considering the f as a named range. If you name a single cell as f, then the COUNTIF will use whatever value is in that cell as its second argument.

Here is an example where cell D4 has been given the name f. It hold the value "b" so the COUNTIF is returning 3 because there are three "b"s in the range being counted.

Excel Workbook
ABCD
1a3
2b
3b
4fb
5f
6b
7
8
9
10
Sheet4
#VALUE!
</td></tr></table></td></tr></table>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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