VIP
Trusted Members
June 25, 2016
VIP
Trusted Members
June 25, 2016
Active Member
November 22, 2019
Thanks for your responses. And I have to apologise, because the cells I need a zero in front of has 10 numbers ,not 9.
the cells I don’t need a zero in front of , has 9 numbers in it.
It’s the opposite of what I said earlier .
these are all in the same column.
Ive tried the text formula and if I apply it to the 10 number cells, and copy the formula down , it will also give a zero in front of the cells with 9 numbers, which i don’t need.
so I suspect I need a type of IF formula ?
July 16, 2010
Hi Anne,
Yes, an IF will work. The formula below will convert both 9 and 10 digit numbers to text:
=IF(LEN(A1)=9,TEXT(A1,"000000000"),TEXT(A1,"00000000000"))
If you're happy with a mix of numbers and text in the column then you can use this:
=IF(LEN(A2)=9,A1,TEXT(A1,"00000000000"))
Although I would encourage you to have consistent values, therefore the first formula would be best.
Mynda
1 Guest(s)