Hi,
I have a list of numbers with 2, 3, and 4 digits. Is there a formula that can recognize if there are only 2 digits, it will add 2 zeros in front of the number.
For example,
47 will become 0047
234 will become 0234
1234 will become 1234
Hi,
I have a list of numbers with 2, 3, and 4 digits. Is there a formula that can recognize if there are only 2 digits, it will add 2 zeros in front of the number.
For example,
47 will become 0047
234 will become 0234
1234 will become 1234
Something like:
if(len(cell reference)=4,(cell reference),if(len(cell reference)=3,"0"&(cell reference),if(len(cell reference)=2,"00&(cell reference)))))
cell reference = cell with data
May work
you can do Format Cell> Custom> 0000
which changes the appearance but not the reality (234 is still number 234)
or in another cell
=TEXT(A1, "0000"). this changes the value to text with the appropriate zeros.
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
Hi,
=TEXT(A1,"0000")
Regards
Thanks guys! All the tips are very useful!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks