Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Packing characters

Hi

I have an exercises where I have a list of different names, of different
lengths but I want a result which packs out the name with trailing spaces so
that the final length of the name and spaces always equals 15 for each.

ie john needs 11 spaces added to it for the length to be 15 but andrew needs
9 spaces added.

Thanks

G
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Packing characters

Hi

Try
=(A1)&REPT(" ",15-LEN(A1))

--
Regards

Roger Govier


"Constantly Amazed" wrote
in message ...
Hi

I have an exercises where I have a list of different names, of
different
lengths but I want a result which packs out the name with trailing
spaces so
that the final length of the name and spaces always equals 15 for
each.

ie john needs 11 spaces added to it for the length to be 15 but andrew
needs
9 spaces added.

Thanks

G



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Packing characters

Hi Roger

Thanks that works just fine and has saved me a good deal of time.

G

"Roger Govier" wrote:

Hi

Try
=(A1)&REPT(" ",15-LEN(A1))

--
Regards

Roger Govier


"Constantly Amazed" wrote
in message ...
Hi

I have an exercises where I have a list of different names, of
different
lengths but I want a result which packs out the name with trailing
spaces so
that the final length of the name and spaces always equals 15 for
each.

ie john needs 11 spaces added to it for the length to be 15 but andrew
needs
9 spaces added.

Thanks

G




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default Packing characters

Hi,

Just append 15 blanks to your text and take leftmost 15 characters:
=LEFT(A1&REPT(" ",15),15)

HTH,
Bernd

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed - creating invoice from packing list (both in excel) [email protected] Excel Discussion (Misc queries) 0 August 22nd 06 10:18 AM
Named Ranges - what characters are (or are not) allowed in the nam Niek Otten Excel Discussion (Misc queries) 0 August 4th 06 01:28 PM
How can I control the length of characters a code will return? Tayo Excel Discussion (Misc queries) 0 April 7th 06 04:22 PM
Formula to replace invalid filename characters tschultz Excel Worksheet Functions 2 January 27th 06 07:07 PM
Help - Can't directly input Japanese characters into cell NKK Excel Discussion (Misc queries) 0 January 3rd 06 02:00 AM


All times are GMT +1. The time now is 08:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"