ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating a function (https://www.excelbanter.com/excel-programming/341138-creating-function.html)

JT

creating a function
 
I would like to create a function or soemthing that checks to be sure the
length of a certain cell is 5 characters, no more or less; whenever the user
leaves that cell. It can be if they hit the "enter" key, or an arrow key,
etc.

The other thing I need to do is to write this function (or whatever) in a
new spreadsheet / workbook.

My macro is going to check for a specific file name and if that file is not
found, it will create the file. However, the new file has to have the same
capabilty to check that certain cell for 5 characters.

Any suggestions on how this could be accomplished would be appreciated.
Thanks for the help..........
--
JT

Chip Pearson

creating a function
 
You can use Data Validation from the Data menu to restrict text
length to 5 characters.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JT" wrote in message
...
I would like to create a function or soemthing that checks to be
sure the
length of a certain cell is 5 characters, no more or less;
whenever the user
leaves that cell. It can be if they hit the "enter" key, or an
arrow key,
etc.

The other thing I need to do is to write this function (or
whatever) in a
new spreadsheet / workbook.

My macro is going to check for a specific file name and if that
file is not
found, it will create the file. However, the new file has to
have the same
capabilty to check that certain cell for 5 characters.

Any suggestions on how this could be accomplished would be
appreciated.
Thanks for the help..........
--
JT





All times are GMT +1. The time now is 01:43 PM.

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