View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Specify certain length(characters) when defining a column

True, Data Validation can be used to check text length, but **only** if
typed into the cell being validated... users can Paste longer text into the
cell without triggering the validation alert... the event code I posted will
react under both situations.

--
Rick (MVP - Excel)


"p45cal" wrote in message
...

Data Validation in cells can check text length for you.

This sounds like you're preparing fixed-width field files, so you may
also want to pad out shorter strings to the right length. If you go for
a vba (macro) solution, take a look at RSET and LSET


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=160321

Microsoft Office Help