Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

What is the best way to program the custom cell format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Owen Zhang - 06 Mar 2008 19:48 GMT
I need to have a format of all the cells of selected row to be 8
characters and if the word of the cell is less than 8 characters,
then
padding with space. For example, if I enter "ABC" in one of the cells
of the row, then the format will automatically become "ABC     ",
which 5 spaces automatically appended to "ABC".
Bernard Liengme - 06 Mar 2008 20:51 GMT
Here is a formula, not a format
=A1&REPT(" ",8-LEN(A1))
best wishes
Signature

Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

>I need to have a format of all the cells of selected row to be 8
> characters and if the word of the cell is less than 8 characters,
> then
> padding with space. For example, if I enter "ABC" in one of the cells
> of the row, then the format will automatically become "ABC     ",
> which 5 spaces automatically appended to "ABC".
Henn Sarv - 07 Mar 2008 07:24 GMT
You can use custom format in cell

like

@"     "

then the entry is allways FORMATED (as You requested) with 5 spaces after
But You never "see" them 5 spaces without aligning cells to right

Henn

>I need to have a format of all the cells of selected row to be 8
> characters and if the word of the cell is less than 8 characters,
> then
> padding with space. For example, if I enter "ABC" in one of the cells
> of the row, then the format will automatically become "ABC     ",
> which 5 spaces automatically appended to "ABC".

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.