Thread: Leading Zero
View Single Post
  #4   Report Post  
akk
 
Posts: n/a
Default

Hi

Am not sure how you would insert a zero beltween sample
and product but for the others you can try this.

I am just showing how to precede zeroes for qty, in your
example.

Assuming the qty is in C2,

=IF(LEN(C2)=3,C2,IF(LEN(C2)=2,"0"&C2,"00"&C2))

Similarly you can work out for product and part number in
separate cells. Then use concatenate to combine the 3 cells
(one each for formatted product, part and quantity) as
above. It would work fine.


-----Original Message-----
Jeffro,

Thanks for your suggestion.
Probably I was not very clear on my intent.
I want to avoid having to manually input "0" for blank

spaces and am looking
for a way for Excel to replace this automatically or via

some function
changes etc.

ie the inputs coming from third parties come in as text
eg Product="Sample product" part no="123" qty="2"
I need to translate this to
Product= text length 16
part no= text length 6
qty=text length 3
The translated text I am looking for

is"Sample0product00000123002"

Hope that this clarifies on my problem/challenge
"Jeffro" wrote:

Michael,

Click on the cell that you want to include the zero's

in the word. Right
click and go down to format cells. Go to the "number"

tab and there will be
a box on the left side. Select Text then click "OK".

You should be able to
type zero's in front of your text from that point.

Jeff

"Michael" wrote:


Need some Help.

Trying to include leading zeros into my inputs.

eg "1234" to display "0001234" and "Sample product"

to display
"00Sample0product"

I was able to do this for the numbers but was not

able to display
preceeding 00 and inserting 0 for blank space

Further more when I combine the different cells

via "CONCATENATE" function I
found the preceeding zeros disappearing.

Can someone please help?

Thanks


Michael


.