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

Changing a cell color to red if it contains more than 255 characters

I have a colums with several cells with texts. I will use these cells to populate a database and these cells cannot have more than 255 characters including spaces.


How do I make those cells containing more than 255 characters to turn red or give me some warning, so I can retype the text to fit within 255 characters?


thanks.

Posted on Sep 21, 2013 1:12 AM

Reply
Question marked as Best reply

Posted on Sep 21, 2013 10:15 AM

Hi LB,


You are looking for a means of conditionally formatting the cell, with the condition being the length of its conrtent being greater than 255 characters.


Unfortunately, that condition isn't in the list of available rules that can trigger a conditional format change:

User uploaded file

You could, however add a cell adjacent to the one containing the text, and use that to flag the cell when the limit is exceeded. Here's an example, using a maximum length of 10 characters to allow seeing the text and results in this post:

User uploaded file

The formula in all cells of column B is: =LEN(A)


The result may be hidden by setting the default text colour in these cessl to white (I've used a light grey to allow the results to be seen). The conditional format can be set as shown below the table. If you do not want the actual count to be visible set the conditional text colour to match the conditional fill colour.


Note that you must confirm the contents of the column A cell before the calculation in column B will be done.


Regards,

Barry

2 replies
Question marked as Best reply

Sep 21, 2013 10:15 AM in response to LunarBase

Hi LB,


You are looking for a means of conditionally formatting the cell, with the condition being the length of its conrtent being greater than 255 characters.


Unfortunately, that condition isn't in the list of available rules that can trigger a conditional format change:

User uploaded file

You could, however add a cell adjacent to the one containing the text, and use that to flag the cell when the limit is exceeded. Here's an example, using a maximum length of 10 characters to allow seeing the text and results in this post:

User uploaded file

The formula in all cells of column B is: =LEN(A)


The result may be hidden by setting the default text colour in these cessl to white (I've used a light grey to allow the results to be seen). The conditional format can be set as shown below the table. If you do not want the actual count to be visible set the conditional text colour to match the conditional fill colour.


Note that you must confirm the contents of the column A cell before the calculation in column B will be done.


Regards,

Barry

Changing a cell color to red if it contains more than 255 characters

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