Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Carrie
 
Posts: n/a
Default Defined number of characters

I have a spreadsheet that has numerical values in cells of different lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
adding or removing zeros at the beginning and therefore not altering the
value. I then want it to appear as text rather than number. Can anyone help
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default Defined number of characters

If your value was in A1:

=TEXT(A1,"000000")


--
Regards,
Dave


"Carrie" wrote:

I have a spreadsheet that has numerical values in cells of different lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
adding or removing zeros at the beginning and therefore not altering the
value. I then want it to appear as text rather than number. Can anyone help

  #3   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default Defined number of characters

Try someting like:

=IF(LEN(A1)<=6,TEXT(A1,"000000"),TEXT(RIGHT(A1,6), "000000"))

HTH
JG

"Carrie" wrote:

I have a spreadsheet that has numerical values in cells of different lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
adding or removing zeros at the beginning and therefore not altering the
value. I then want it to appear as text rather than number. Can anyone help

  #4   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE
 
Posts: n/a
Default Defined number of characters

One way:
=REPT(0,6-LEN(A1)) & A1

HTH,
Paul

"Carrie" wrote in message
...
I have a spreadsheet that has numerical values in cells of different
lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
adding or removing zeros at the beginning and therefore not altering the
value. I then want it to appear as text rather than number. Can anyone
help



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
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Delete A Word That Exceeds X Number Of Characters brazen234 Excel Worksheet Functions 3 December 31st 05 04:37 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
trim a string by specific number of characters windyoldman Excel Discussion (Misc queries) 2 July 13th 05 01:53 PM
fill or truncate to a certain number of characters in a cell Jan Buckley Excel Worksheet Functions 1 March 16th 05 03:46 PM


All times are GMT +1. The time now is 10:25 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"