View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Count number of digits in a cell

This returns the number of characters, including spaces, in A1.
=LEN(A1)

This will add the appropriate number of leading zeros.
=REPT(0,14-LEN(A1))&A1

HTH,
Paul

"Julieeeee" wrote in message
...
I have a column of numbers that all need to be 14 digits long. So I need
to
add leading zeros... Currently I am doing =00&A4 and that would be great
if
they were all 12 digits (12 + 00 = 14 digits) but some are 7, 8, 9, 10,
and
11 digits. Is there a formula to count the number of digits in the cell?