PC Review


Reply
Thread Tools Rate Thread

Custom Fields with spaces

 
 
durstbj@gmail.com
Guest
Posts: n/a
 
      13th Jul 2007
Hi,
The easiest way to explain my dilemma is by example. I need a custom
field that is always thirty character spaces long no matter how long
the text is. So for example, lets say the word is PIZZA which is 5
characters, I would need 25 blank spaces afterwards to get to 30
characters in total. Does anybody know what this would look like?
I've tried to use the _ but that doesn't seem to work. Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      13th Jul 2007
Try something like this...

Sub PadText()
Dim str As String

str = "Pizza"
MsgBox str & "!"
str = str & Space(30 - Len(str))
MsgBox str & "!"
End Sub
--
HTH...

Jim Thomlinson


"(E-Mail Removed)" wrote:

> Hi,
> The easiest way to explain my dilemma is by example. I need a custom
> field that is always thirty character spaces long no matter how long
> the text is. So for example, lets say the word is PIZZA which is 5
> characters, I would need 25 blank spaces afterwards to get to 30
> characters in total. Does anybody know what this would look like?
> I've tried to use the _ but that doesn't seem to work. Thanks.
>
>

 
Reply With Quote
 
=?Utf-8?B?R2FyeSBCcm93bg==?=
Guest
Posts: n/a
 
      13th Jul 2007
If your data is in Cell A1 then...

=LEFT(A1,30)&REPT(" ",30-LEN(LEFT(A1,30)))

--
HTH,
Gary Brown
(E-Mail Removed)
If this post was helpful to you, please select
''''''''''''''''YES'''''''''''''''' at the bottom of the post.



"(E-Mail Removed)" wrote:

> Hi,
> The easiest way to explain my dilemma is by example. I need a custom
> field that is always thirty character spaces long no matter how long
> the text is. So for example, lets say the word is PIZZA which is 5
> characters, I would need 25 blank spaces afterwards to get to 30
> characters in total. Does anybody know what this would look like?
> I've tried to use the _ but that doesn't seem to work. Thanks.
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      13th Jul 2007
Check your other posts, too.

(E-Mail Removed) wrote:
>
> Hi,
> The easiest way to explain my dilemma is by example. I need a custom
> field that is always thirty character spaces long no matter how long
> the text is. So for example, lets say the word is PIZZA which is 5
> characters, I would need 25 blank spaces afterwards to get to 30
> characters in total. Does anybody know what this would look like?
> I've tried to use the _ but that doesn't seem to work. Thanks.


--

Dave Peterson
 
Reply With Quote
 
durstbj@gmail.com
Guest
Posts: n/a
 
      13th Jul 2007
On Jul 13, 12:06 pm, Gary Brown
<gary"DeleteThis2SendMeAnEmail".Br...@kinneson.com> wrote:
> If your data is in Cell A1 then...
>
> =LEFT(A1,30)&REPT(" ",30-LEN(LEFT(A1,30)))
>
> --
> HTH,
> Gary Brown
> gary.DeleteThis2SendMeAnEmail.Br...@kinneson.com
> If this post was helpful to you, please select
> ''''''''''''''''YES'''''''''''''''' at the bottom of the post.
>
>
>
> "durs...@gmail.com" wrote:
> > Hi,
> > The easiest way to explain my dilemma is by example. I need a custom
> > field that is always thirty character spaces long no matter how long
> > the text is. So for example, lets say the word is PIZZA which is 5
> > characters, I would need 25 blank spaces afterwards to get to 30
> > characters in total. Does anybody know what this would look like?
> > I've tried to use the _ but that doesn't seem to work. Thanks.- Hide quoted text -

>
> - Show quoted text -


Got it thanks for all the help!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fields with exact number of spaces so spaces show in txt file Craig Microsoft Access Queries 1 13th Mar 2009 09:15 PM
Custom Fields with spaces durstbj@gmail.com Microsoft Excel Discussion 15 16th Jul 2007 10:09 AM
Custom Fields with spaces durstbj@gmail.com Microsoft Excel Misc 15 16th Jul 2007 10:09 AM
Re: Shrinking fields or spaces between fields Cheryl Fischer Microsoft Access 0 7th Apr 2004 02:29 PM
Need to rid fields of spaces Josh M Microsoft Access Form Coding 2 21st Nov 2003 01:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:15 PM.