Conditional tick boxes in Apple Numbers

I have a spreadsheet with a column of tick boxes. I would like to set up an easy way to overview whether this entire column has been ticked, hopefully with another tick box elsewhere. Failing that, I am happy to create conditional colouring rules. How can I do this? I've tried IF statement but can't get it to work.

Posted on Jun 26, 2024 9:38 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 26, 2024 11:17 PM

Hi Marcus,


the COUNTIF function is your friend.

Here is a table with one Header Row and one Footer Row.



Formula in Footer Cell B8 is COUNTIF(B,"TRUE")


And yes, Conditional Highlighting is indeed possible.



Now to get really fancy:


Formula in Footer Cell B8 is COUNTIF(B,"TRUE")&" of "&ROWS(B,1)&" Tickboxes."


Happy Numbering!

Ian.

4 replies
Question marked as Top-ranking reply

Jun 26, 2024 11:17 PM in response to marcuslastname

Hi Marcus,


the COUNTIF function is your friend.

Here is a table with one Header Row and one Footer Row.



Formula in Footer Cell B8 is COUNTIF(B,"TRUE")


And yes, Conditional Highlighting is indeed possible.



Now to get really fancy:


Formula in Footer Cell B8 is COUNTIF(B,"TRUE")&" of "&ROWS(B,1)&" Tickboxes."


Happy Numbering!

Ian.

Jun 27, 2024 6:36 AM in response to marcuslastname

You want a neat way to do exactly as you asked, to have a checkbox get checked when all the checkboxes in a column are checked? Or, more precisely, the instructions below will give you a cell that looks like a checkbox but is actually a TRUE/FALSE formula that is displayed as a checked/unchecked box.


  1. Select the cell(s) where you want the automatic checkbox
  2. Run the AppleScript given below. (Copy/paste it into the Script Editor app then hit the "play/run" button.) The result should be a checkbox but the cell will have a formula of =TRUE.
  3. Edit the cell's formula. The one I would use would be something like =COUNTIF(B,TRUE)=COUNTA(B) . This is like the condition in an IF statement. If the two counts are the same then the result will be true.


This is an undocumented "feature" so it may get "fixed" by Apple in the future. I recall this can be done in the iOS version without any scripts by simply formatting a cell as checkbox then entering a formula. So it could just be a non-implemented feature in the Mac version.


tell application "Numbers"
	tell front document to tell active sheet
		tell (first table whose selection range's class is range)
			repeat with aCell in (get selection range)'s cells
				set format of aCell to "checkbox"
				set value of aCell to "=TRUE"
			end repeat
		end tell
	end tell
end tell

Jun 27, 2024 9:07 AM in response to marcuslastname

marcuslastname wrote:

easy way to overview whether this entire column has been ticked, hopefully with another tick box elsewhere.


Another simple idea:




=COUNTIF(Table 1::B,TRUE)=ROWS(Table 1::B,1)−COUNTIF(Table 1::B,"")


If you're not in the habit of keeping "blank" rows at the bottom of the table, then this will do:


=COUNTIF(Table 1::B,TRUE)=ROWS(Table 1::B,1)


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Conditional tick boxes in Apple Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.