PC Review


Reply
Thread Tools Rate Thread

What is the best way to program the custom cell format

 
 
Owen Zhang
Guest
Posts: n/a
 
      6th Mar 2008
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".
 
Reply With Quote
 
 
 
 
Bernard Liengme
Guest
Posts: n/a
 
      6th Mar 2008
Here is a formula, not a format
=A1&REPT(" ",8-LEN(A1))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Owen Zhang" <(E-Mail Removed)> wrote in message
news:5f2b5c02-baf0-49ff-a43b-(E-Mail Removed)...
>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".



 
Reply With Quote
 
Henn Sarv
Guest
Posts: n/a
 
      7th Mar 2008
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



"Owen Zhang" <(E-Mail Removed)> kirjutas sõnumis
news:5f2b5c02-baf0-49ff-a43b-(E-Mail Removed)...
>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".


 
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
Format Cell as custom type but data doesn't display like I custom. ToMMie Microsoft Excel Misc 6 11th Sep 2008 08:31 AM
Custom Cell format to mimic time format brotherescott@yahoo.com Microsoft Excel Misc 6 7th Nov 2006 09:17 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft ADO .NET 7 28th Jan 2004 09:04 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft Dot NET Framework Forms 5 7th Jan 2004 09:09 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft VB .NET 2 19th Dec 2003 10:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:57 AM.