ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Enforcing a Cell format (https://www.excelbanter.com/excel-programming/362242-enforcing-cell-format.html)

dok112[_145_]

Enforcing a Cell format
 

Hey everyone, I need some help. I have tried everything I can think of
to enforce this, but I keep running into errors.

Any values in column B or C I need to have a specific format "### -
########## - ######## - ##/##/####"

I thought about just using a concatenate formula, but it was causing
too much excess work. My employee's are aware they are to enter it in
this format, but in case they enter it incorrectly, I want the cell to
update to the correct format.

EX.

TEL - TRV303902 - I322390I - 04/21/2006
ABC - TRV000000 - INV33029I - 04/21/2006

The variables can change in each field. The first set will always be
2-3 letters depending on the initials of the person making the entry.
the next 2 sets can range anywhere from 5-9 alphanumeric characters,
and the last set will always be a date. And I need it to be hyphenated
like above as well.

Any help will be greatly appreciated!! Thanks y'all!


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=544913


Tom Ogilvy

Enforcing a Cell format
 
Your entering text and you can't format text.

You might want to explore the Change Event
http://www.cpearson.com/excel/events.htm
if your are not familiar with events.

--
Regards,
Tom Ogilvy

"dok112" wrote in
message ...

Hey everyone, I need some help. I have tried everything I can think of
to enforce this, but I keep running into errors.

Any values in column B or C I need to have a specific format "### -
########## - ######## - ##/##/####"

I thought about just using a concatenate formula, but it was causing
too much excess work. My employee's are aware they are to enter it in
this format, but in case they enter it incorrectly, I want the cell to
update to the correct format.

EX.

TEL - TRV303902 - I322390I - 04/21/2006
ABC - TRV000000 - INV33029I - 04/21/2006

The variables can change in each field. The first set will always be
2-3 letters depending on the initials of the person making the entry.
the next 2 sets can range anywhere from 5-9 alphanumeric characters,
and the last set will always be a date. And I need it to be hyphenated
like above as well.

Any help will be greatly appreciated!! Thanks y'all!


--
dok112
------------------------------------------------------------------------
dok112's Profile:

http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=544913





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

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