Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-26-2021, 09:08 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline adding zeros before a number depending on the number of digits Windows 7 64bit adding zeros before a number depending on the number of digits Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Sorry I misunderstood. Perhaps
Code:
=if(LEN(A1)=3,TEXT(A1,"00000"),TEXT(A1,"0000000"))
.
This only changes the formatting, the underlying value will not change
If you need to use the obtained string then
Code:
=IF(LEN(A1)=3,"00"&A1,"000"&A1)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove trailing zeros from number format but only for a zero value Matt C Excel 3 11-22-2021 06:46 AM
adding zeros before a number depending on the number of digits Merge field return last 4 digits of a number macquhele Mail Merge 6 08-01-2020 11:04 PM
Entering a number of 19 digits Jo Freeman Excel 11 11-08-2017 06:20 AM
Having number's digits together mohsen.amiri Word 0 06-23-2017 01:20 AM
adding zeros before a number depending on the number of digits How to create a table with a number of line depending a number entered by user Cellendhyll Word Tables 3 07-10-2014 05:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft