Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Fill a 15 Characters Data with Zeros

I am getting nuts with this....

I have an amount in A1: 108.203

And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.

E.I.:
The result must be:
A2= 00000000108.203

Is there a way to do it?
Thanks in advance for your help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Fill a 15 Characters Data with Zeros

Maybe...
=text(a1,rept("0",11)&".000")

Is the number of decimal places always 3?



ileanardz wrote:

I am getting nuts with this....

I have an amount in A1: 108.203

And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.

E.I.:
The result must be:
A2= 00000000108.203

Is there a way to do it?
Thanks in advance for your help.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Fill a 15 Characters Data with Zeros

Yes, it is part of the "must" even A1 could be .01
A2 must display .010

Thanks your help


On Feb 24, 8:21*pm, Dave Peterson wrote:
Maybe...
=text(a1,rept("0",11)&".000")

Is the number of decimal places always 3?





ileanardz wrote:

I am getting nuts with this....


I have an amount in A1: 108.203


And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.


E.I.:
The result must be:
A2= 00000000108.203


Is there a way to do it?
Thanks in advance for your help.


--

Dave Peterson- Hide quoted text -

- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 516
Default Fill a 15 Characters Data with Zeros

A variation to Dave's formula:

=REPT(0,15-LEN(A1))&A1

This analyzes the length of the value in cell A1 and adds the appropriate
number of zeros to get to a total length of 15. This allows any number of
decimal places.

"Dave Peterson" wrote:

Maybe...
=text(a1,rept("0",11)&".000")

Is the number of decimal places always 3?



ileanardz wrote:

I am getting nuts with this....

I have an amount in A1: 108.203

And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.

E.I.:
The result must be:
A2= 00000000108.203

Is there a way to do it?
Thanks in advance for your help.


--

Dave Peterson
.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,494
Default Fill a 15 Characters Data with Zeros

this may work for you

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

--


Gary Keramidas
Excel 2003


"ileanardz" wrote in message
...
I am getting nuts with this....

I have an amount in A1: 108.203

And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.

E.I.:
The result must be:
A2= 00000000108.203

Is there a way to do it?
Thanks in advance for your help.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Fill a 15 Characters Data with Zeros

Thank you very much!!!!!
This really help me =)

This was the best for the .000
;)

=text(a1,rept("0",11)&".000")

Kind regards!!

On Feb 24, 8:09*pm, ileanardz wrote:
I am getting nuts with this....

I have an amount in A1: 108.203

And I need to fill A2 that must be 15 characters with the value of A1
and the remain characters before the first number (1) must be fill
with Zeros.

E.I.:
The result must be:
A2= 00000000108.203

Is there a way to do it?
Thanks in advance for your 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
add zeros to fill in and LG[_2_] Excel Worksheet Functions 0 August 21st 09 08:35 PM
add zeros to fill in and LG[_2_] Excel Worksheet Functions 0 August 21st 09 08:34 PM
add zeros to fill in and Dave Peterson Excel Worksheet Functions 4 August 1st 09 02:55 PM
How do I make a number have leading zeros to fill width of cell? Max_Rebo1 Excel Discussion (Misc queries) 4 October 14th 05 05:31 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 12:37 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"