ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Character count and locking? (https://www.excelbanter.com/excel-discussion-misc-queries/84154-character-count-locking.html)

Liani

Character count and locking?
 
I would like to set up a formula that does a character count of info in a
cell and then lock that cell so that the info cannot go over 33 characters.

[email protected]

Character count and locking?
 
Hi Liani,

You can count characters by this formula: =len(a1)

It is not possible to lock cell with formula, you can do it via VBA
sub.

Regards,
Ivan


starguy

Character count and locking?
 

you can use data validation to restrict data with more than 33
characters.

select the range you want to enter the data in.

go to Data Validation

Settings in Allow (text length) and in Data (less than) and in
Maximum put 33 or whatever length you want.

hope this would be solution of your question.


--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=534461



All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com