View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default specify data size in cell add 0's

Something like this:

=TEXT(MID(A2,1,LEN(A2)-1)&0,"0000000000000000")

Note that if you need this to be a number, you can use:
=VALUE(MID(A2,1,LEN(A2)-1)&0)
and just format cells - number tab, custom format of
0000000000000000
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"donna13pa" wrote:

I want to specify that if data I am importing is 5556946581 it will return as
0000005556946580. It will add 0's to the beginning to make the length 16
characters long and also change the last number to 0 if it is a number from
1-9