Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Force a Number to be entered

Is there a way to force the content of a table cell to be only a number. I have set Conditional Formatting to change the cell color if the content is not between 0.1 and 999. This does not solve a problem if a "space" or punctuation is entered. Thanks

IMAC (RETINA 5K, 27-INCH, LATE 2015), iOS 11.2.1

Posted on Dec 14, 2017 7:03 PM

Reply
Question marked as Best reply

Posted on Dec 14, 2017 8:13 PM

Hi Jeff,


How is the content placed in that cell?

If it's generated by a formula, there's probably a way to revise the formula to always place a numerical result.

f it's entered directly, Numbers will accept whatever you enter, and change formatting to accommodate the type of data entered.


You can use more than one conditional highlighting rule, though, and although it won't prevent entry of a non-numeral, the rules can be used to flag anything outside the acceptable range of numbers, whether it's 'outside' the top or bottom boundary, or 'outside the 'data type' boundary to left or right:

User uploaded file

Default 'fill' for the cell is set to 'no fill'.

Numbers accepts the first rule for which the condition is met.

Rule 1 changes the fill to 'White," making no change in the display, provided the colour behind the table is also white.


If Rule 1 has NOT set a colour fill, Rule 2 is called into play, and unless the content of the cell includes an unbroken string of at least seven x characters, turns the cell fill to red.


Regards,

Barry

2 replies

There are no replies.

Force a Number to be entered

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