Countif formula not working if used the same range as the data it is searching for

Dan23

New Member
Joined
Dec 4, 2019
Messages
8
Office Version
  1. 2013
Platform
  1. Windows
Hi,

This is my formula: =COUNTIF(range,"=*Y*"); also tried =COUNTIF(range,"*Y*"); and =COUNTIF(range,"Y").
Goal: trying to count the number of "Y"s within the cell range
Problem: Formula works only if I enter it outside of the range within the formula i.e if I want to find all Ys within the whole C coloum (C:C) and I enter this formula any other column but C, the formula displays the correct result. However if I enter the forumula within the C column the formula displays 0
 

Attachments

  • formula work.png
    formula work.png
    13 KB · Views: 37
  • formulanotwork.png
    formulanotwork.png
    17.5 KB · Views: 37

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi,

Just be specific with your range B2:B1000

Hope this will help
 
Upvote 0
Sorry I am not sure how to filter to find the problem, however the same error occurs for all of my columns.
 
Upvote 0
Is there a chance you could upload your file to dropbox or google drive ?
 
Upvote 0
This is a circular reference error where a formula refers to its own cell either directly or indirectly. This might cause them to calculate incorrectly. Try removing or changing these references, or moving the formulas to different cells.

In column B, it should be in B1:

Code:
=COUNTIF(B2:B1000,"y")


Also make sure the calculation options should be set to automatic under formulas
 
Upvote 0
VDS I think you are right, I received a circular reference error message when restarting the workbook. Will try your suggestions tomorrow when I have time and communicate if problem is solved. Here is a link to it in case you wanted to check it out:

 
Upvote 0
Problem solved, thanks to VDS1's suggestion, instead of b:b used B2:B1000. Would prefer to use B:B as it is more efficient to click on the column than type in myself, however document will not be used frequently so is a minor inconvienience. Thanks for VDS and James for your assistance.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,664
Members
448,976
Latest member
sweeberry

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