Strange COUNTIF problem when referencing checkbox column in a different sheet
Dear Smartsheet Community,
I'm observing a strange problem and not sure whether it's because I'm doing something wrong:
I've used the COUNTIF function many times to count the number of checked checkboxes in a column, for example using =COUNTIF(CheckboxColumn:CheckboxColumn, TRUE) - and using the 'FALSE' equivalent to count unchecked checkboxes. All works fine and as expected - even if there are some rows with no checkboxes - e.g. those that are usually present at the bottom of a sheet.
However, I came across a weird thing the other day: when I use the COUNTIF function with a range reference to another sheet e.g. =COUNTIF({Checkbox Column in other sheet},FALSE) (where I used the reference range picker window to highlight the whole of the CheckboxColumn in order to get he equivalent of CheckboxColumn:CheckboxColumn) instead of getting a value that represents the number of checkboxes un-checked in that range, I get the number of rows with no checked checkbox - which includes the number of empty rows that usually appear at the bottom of a sheet.
The column in question is 'typed' as a Checkbox column, and there are no empty checkboxes in the empty rows at the bottom of the referenced sheet.
I wonder if anyone can shed some light on this behaviour, and how I can fix it to give me the same result I would expect if using the same formula on the same sheet as the column being counted.
Many thanks in advance!
Answers
-
Hello @route79
To count the checkboxes from another sheet using the same function, the only difference is that you will count the checkboxes from another sheet or reference sheet:
Please try this formula:
=COUNTIF({SheetName!CheckboxColumn}, 1)
Replace "SheetName CheckboxColumn" with the name of the sheet and the column containing the checkboxes you want to count.
Hope this helps!
che
-
Hi @route79,
o accurately count unchecked checkboxes in a different sheet while excluding empty cells, I suggest using the
COUNTIFS
function with two criteria: the checkbox column and a text-based column (like a task names column) to ensure we're only counting rows that have content. You would use theISTEXT
function as part of the second criterion to check for the presence of text, which implies the row is not empty.here is a sample to counting unchecked box:
=IFERROR(COUNTIFS({Checkbox Column in other sheet}, @cell = false, {Task Name}, ISTEXT(@cell)), "")
and the following formula to counting the checked box:
=IFERROR(COUNTIFS({Checkbox Column in other sheet}, @cell = true, {Task Name}, ISTEXT(@cell)), "")
and the following screenshot shows what i mean
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!