Try something along the lines of
Dim S As String
S = "whatever"
If Len(S) = 18 Then
S = Left$(S, 18)
Else
S = S & Space$(18 - Len(S))
End If
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Tue, 12 May 2009 12:11:01 -0700, David Langschied
wrote:
I am completing a requirement for a bank upload of account transactions.
There is a requirement that the upload contain blanks to the right to fill a
required field. I am struggling to figure out how to do this.
Example:
If the field is 18 characters long and the entry is 10 characters long, then
they want the remaining characters expressed as blanks to the right.
So,
HowdyDoody would be "HowdyDoody "
Any ideas?