How to Add a Zero in Front of a Number in Excel - Tutorial

Excel tutorial on how to add a zero in front of a number in Excel, or what is sometimes called "leading zeros."
Knowing how to add a 0 as the first number in Excel can be tricky. Especially if you have to figure out how to add the right number zeros in front of them.
In this Excel tutorial, we go over 3 ways to add a zero in front of a number in Excel.
1. We first add a zero in front by using an apostrophe and the zeros in each cell. This converts your numbers to text format, letting you add however many leading zeros you want.
2. We, next, insert a zero before a number by using the REPT function.
3. The third way we add leading zeros in front of cells is by using Custom Formatting.
Click here to read our step-by-step article on how to add a zero before a number in Excel: yacostasolutions.com/zero-in-...
00:00 - Intro on How to Add Zeros in Front of a Number in Excel (i.e., Leading Zeros)
00:30 - How to Add a Zero Before a Number by Using an Apostrophe
01:28 - Learn Ways to Use the REPT Function to Insert Zeros in Front of Numbers
03:40 - See How to Apply Custom Formatting to Add 0 in Front of a Number
On a related topic, make sure to watch my tutorial on the Leading Zeros Beta: • Excel Leading Zeros Se...
If you liked this, make sure to get your FREE pdf list of top Excel keyboard shortcuts: yacostasolutions.com/newsletter/
*FYI:
This tutorial was created using the desktop version of Excel in Microsoft 365. You can upgrade to this version here: yacostasolutions.com/MS365
The screen recording + editing was done using Techsmith Camtasia. You can check it out here: yacostasolutions.com/camtasia
Thanks for watching this Microsoft Excel tutorial and, don’t forget, if you like this video, please “Like” and “Share” with your friends - it really helps us out 😊
To catch our Excel tutorials as they come out, subscribe to this channel by clicking: yacostasolutions.com/youtube
Thanks!
*DISCLAIMER: This video description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. As an Amazon Associate I earn from qualifying purchases. This helps support the channel and allows us to continue to make tutorials like this. Thank you for your support!
#YAcostaTutorials

Пікірлер: 129

  • @YAcostaSolutions
    @YAcostaSolutions4 жыл бұрын

    Like this tutorial? Make sure to grab your FREE pdf list of top Excel keyboard shortcuts: yacostasolutions.com/newsletter/

  • @feljunpaquingan17

    @feljunpaquingan17

    2 жыл бұрын

    thanks, i got mine maam

  • @kevinwalkingPH
    @kevinwalkingPH2 жыл бұрын

    REPT function worked for me thankss

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That’s great! So happy this helped you 🙂

  • @zebecca
    @zebecca5 ай бұрын

    Outstanding! Thank you

  • @YAcostaSolutions

    @YAcostaSolutions

    5 ай бұрын

    Thanks, Rebecca! I’m happy you liked this 🙂

  • @henrytluanga8267
    @henrytluanga8267 Жыл бұрын

    thanks,, the last one is very easy and the best

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    That's great, Henry! I'm happy this helped you 🙂

  • @OliviaAmon-ym6on
    @OliviaAmon-ym6on Жыл бұрын

    Thank you soo much, i just impressed my boss, you made it so easy to understand, thank you once again.

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    That’s awesome, Olivia! 🙌 I’m so happy this helped you so much 🙂

  • @changamalanglosanskrit1716
    @changamalanglosanskrit17162 жыл бұрын

    VERY USEFUL IT HELPED MY A LOT THANKX

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That’s great! I’m so happy this helped you 🙂 Thanks!

  • @sureshnagwan7805
    @sureshnagwan78052 жыл бұрын

    Finally the magic revealed

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Thanks so much! I'm happy this helped you 🙂

  • @muddassirabbas631
    @muddassirabbas631 Жыл бұрын

    Your video is very helpful,keep it up

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks so much! I’m happy this helped you 🙂

  • @AmiyaRanjanNayak
    @AmiyaRanjanNayak2 жыл бұрын

    thanks a ton. This is amazing. you solved my problem within a minute for which I was worried for more than an hour.

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Awesome! Happy this helped you 🙂

  • @mr.chucky575

    @mr.chucky575

    2 жыл бұрын

    @@YAcostaSolutions Thanks a lot I was at work i could not put a zero before the no for someone's id . I did not know i would solve it that fast. Thanks again

  • @Inquisitive9
    @Inquisitive94 жыл бұрын

    This was amazing. I needed that REPT and Length function as it gives me a number that I can use as a reference in my Index Match/ VLookup formula. Just changing the format to custom format does not bring the zero in the number. The Rept and LEN function solved my problem. Thank you so much!! well done!! Brief and to the point!

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Awesome, Fassel! I’m happy this was so helpful to you. Great job!

  • @MoizKhan-uw3hx
    @MoizKhan-uw3hx3 жыл бұрын

    JazakAllaha Great Video

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks, Moiz! I’m glad you liked this 🙂

  • @calebbrumbaugh6880
    @calebbrumbaugh68804 жыл бұрын

    I would just like to say how grateful I am that I came across your video. I have spent hours on Excel trying to figure out how to format.

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    That's awesome, Caleb! I'm glad this helped you and thanks for sharing 😀

  • @sonyaesquire
    @sonyaesquire Жыл бұрын

    I’ve been looking everywhere for a video to help me perform this function!! Thank you sooo much!!! You helped save my grade! ❤❤❤

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks, Sonya! I'm so happy this helped you 🙂

  • @Yuzarsif434
    @Yuzarsif4342 жыл бұрын

    I had to subscribe immediately after you solved my problem.. Thanks a lot 🙏🌹

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That’s awesome! I’m glad this helped you and happy you’ve subscribed - welcome aboard! Thanks so much 🙂

  • @santhoshkaveti1464
    @santhoshkaveti1464 Жыл бұрын

    Thanks 😊

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks! Happy you liked this 🙂

  • @barrywalker1288
    @barrywalker12883 жыл бұрын

    Brilliant... The last example, so simple when you know

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks so much, Barry! I think it’s a pretty cool trick too 😉 I’m happy this was helpful for you!

  • @yajamanamswaroop2495
    @yajamanamswaroop24952 жыл бұрын

    i am soo happy mam, Thanks a ton

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That's great! I'm happy you liked this 🙂

  • @beth.dereeves
    @beth.dereeves4 жыл бұрын

    Excellent! You made my day I was so frustrated for this, thanks a lot!

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Thank you, Betsabe! I’m glad this helped you out 🙂

  • @savanalexis1947
    @savanalexis1947 Жыл бұрын

    Thanks so much ...The second step was brilliant i was looking for this step 🙏🙏👍👍

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Awesome, Savan! I'm happy this helped you 🙂

  • @sinandovalenzuelaii6844
    @sinandovalenzuelaii68443 жыл бұрын

    Nice thank you

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thank you too!

  • @arifzac
    @arifzac4 жыл бұрын

    Never knew Rept function before. Love it Thank you so much

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    That's great, zac! Glad you learned something new 🙂

  • @bikashsharma3755
    @bikashsharma37553 жыл бұрын

    Thank you miss! It worked.

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Awesome! Happy this was helpful for you 🙂

  • @reena6170
    @reena61703 жыл бұрын

    I Really Thank You From The bottom of my heart... Thank You.. You solved my problem... With love from India

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    You’re so very welcome 😊 Happy this helped you.

  • @reena6170

    @reena6170

    3 жыл бұрын

    @@YAcostaSolutions Yes... This helped me sort my voter list....😊😊

  • @naeemscalligraphy
    @naeemscalligraphy5 жыл бұрын

    Thanks ... YA, That was super useful...especially REPT() function... You made made my day! SUBSCRIBED .. hope to see more useful stuff.

  • @YAcostaSolutions

    @YAcostaSolutions

    5 жыл бұрын

    Awesome, Creativity_Inside! Happy to help and welcome aboard 🙂

  • @Chandanik619
    @Chandanik6192 жыл бұрын

    Very useful 👍

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Awesome! Happy this was helpful for you 🙂

  • @honeypeadigital
    @honeypeadigital2 жыл бұрын

    Been looking for this. Thanks!

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Awesome! Happy this helped you 🙂

  • @victoresedebe209
    @victoresedebe209 Жыл бұрын

    Thanks alot

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks, Victor! I’m happy this was helpful for you 🙂

  • @imranmalik.youtube
    @imranmalik.youtube3 жыл бұрын

    It really helps, a big thumbs up for you

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks so much, Imran! I'm happy this helped you 🙂

  • @gangbanggaming5985
    @gangbanggaming59852 жыл бұрын

    excellent

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Thank you 🙂

  • @TheSreang
    @TheSreang3 жыл бұрын

    Very useful video thank you.

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks so much! I’m happy this was useful for you 🙂

  • @wesleyharper3253
    @wesleyharper32532 жыл бұрын

    Thanks

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    You’re very welcome, Wesley. I’m happy you liked this 🙂

  • @Mona-ml8lj
    @Mona-ml8lj2 жыл бұрын

    Thank you mam

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Thank you! Happy you liked this 🙂

  • @AdityaChauhan-ql9xb
    @AdityaChauhan-ql9xb2 жыл бұрын

    tq for support

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thank you, Aditya! I’m happy this helped you 🙂

  • @deanbrereton1809
    @deanbrereton18092 жыл бұрын

    Cheers! You are a legend 🙌

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks so much, Dean 🙂 I’m so happy you liked this!

  • @serrico0869
    @serrico08693 жыл бұрын

    Thank you, I did this 1:42 and it worked as intended.

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    That’s great! I’m happy this was helpful to you 🙂

  • @muhammadabubaker8066
    @muhammadabubaker80663 жыл бұрын

    Thanks for nice information.

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks, Muhammad. I’m happy this helped you 🙂

  • @muhammadabubaker8066

    @muhammadabubaker8066

    3 жыл бұрын

    @@YAcostaSolutions 😊

  • @MOOKY2GS
    @MOOKY2GS3 жыл бұрын

    THANK YOU SO MUCH!!

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thank you 🙂 I’m happy that this helped you.

  • @rafaelhernandez179
    @rafaelhernandez1794 жыл бұрын

    thanks!! needed this for a homework assignment

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    That's great, Rafael! I'm glad this helped you 🙂

  • @UjangBoyor
    @UjangBoyor2 жыл бұрын

    Formatting is the easiest way 😁

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    It’s a favorite for sure 🙂

  • @sayangchen9924
    @sayangchen99242 жыл бұрын

    Thanks so much for your clear explanation and simple way to fix all different cases, it is work well for my report

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That's excellent! So happy this helped you 🙂

  • @qudratullahsarfaraz8746
    @qudratullahsarfaraz87463 жыл бұрын

    Thank you ☺️

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thank you! I’m so happy you liked this 🙂

  • @chantha7969
    @chantha79693 жыл бұрын

    Thank you so much

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks, Chan. I'm happy you liked this 🙂

  • @ramyemam9
    @ramyemam93 жыл бұрын

    really thank you

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    I’m happy this helped you 🙂 Thanks so much!

  • @shoppersdream
    @shoppersdream4 жыл бұрын

    Very Nice Thanks

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Thanks, Peace! Happy you liked this 🙂

  • @girishmahajan5370
    @girishmahajan53704 жыл бұрын

    done, best trick

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Thanks so much, Girish! I'm happy this was helpful for you 🙂

  • @Fromard
    @Fromard2 жыл бұрын

    Isn't it fascinating that a computer program would make it so difficult to do something so easy? How about letting me type what ever number I want in the cell and then when I click on another cell YOU DON'T CHANGE IT. Wouldn't that be amazing?

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    That would be a dream come true!

  • @pavitraudaan5562
    @pavitraudaan55624 жыл бұрын

    Thanks you so much typing zero without error

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Thanks! Happy this helped you 🙂

  • @pavitraudaan5562

    @pavitraudaan5562

    4 жыл бұрын

    @@YAcostaSolutions 2 digit Number Wale Me To Zero Lag Raha Magar, 10 Digit wale Me Zero Nahi Lag Pa raha Hai Kyuki, Reference no 00 Double Zero Se Shuru Hota Hai Magar, Zero Tahar Nahi Raha Gayab Ho Ja raha Hau Please Reply It's Very Difficult for me

  • @ngoransylvain2503
    @ngoransylvain25033 жыл бұрын

    good

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Thanks so much, Ngoran! I’m glad you liked this 🙂

  • @iminpaul8867
    @iminpaul88672 жыл бұрын

    Lovely

  • @YAcostaSolutions

    @YAcostaSolutions

    2 жыл бұрын

    Thanks so much! I’m happy you liked this 🙂

  • @rajcatchem7942
    @rajcatchem79423 жыл бұрын

    Thank u so much. But quick question like I saved the excel sheet and closed it and open it again I lost the zeros in front of all the numbers. Tried like so many times. Please help much appreciated. 😭

  • @mubasyirrawi4344
    @mubasyirrawi4344 Жыл бұрын

    done subscribe

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Yes!!! Thanks so much and happy to have you join us 🙂

  • @malloryzinkus8682
    @malloryzinkus86824 жыл бұрын

    Will you include the formula in the comments? For some reason, when I type it out, I get the Value error.

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Hi, Mallory. Sorry about that! It was the REPT function that was used. I used it 2 ways - 1. In the first example, it was used with the "&" to combine the repeated zeros with the original values. Here's an example of this: =REPT(0,2)&A2 2. The second example used the REPT function in an IF statement so that the right number of zeros would be added to make all final values the same number of characters. An example of that is: =IF((LEN(A2)

  • @anasmohd929
    @anasmohd9292 жыл бұрын

    if I want to add same digit to the last of any figure then?

  • @omarabdelaziz-el-ashry-Eg
    @omarabdelaziz-el-ashry-Eg3 жыл бұрын

    Hello, Hello, If the number looks like this Q002 and I want it to be like this 0002 so I want to take Q off and add 0 what formula can I use? Thank you

  • @JC-yi1jq

    @JC-yi1jq

    Жыл бұрын

    Yes

  • @mohsinalisultanali9255
    @mohsinalisultanali9255 Жыл бұрын

    This was really great, the problem is that when we copy this no to another cell it loses this property

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Hi and thanks for your comment. Are you maybe using one of the paste special options - like Paste Values? I haven't had this issue so just curious about what could be causing it. Thanks.

  • @amitpathak5294
    @amitpathak5294 Жыл бұрын

    Wow

  • @YAcostaSolutions

    @YAcostaSolutions

    Жыл бұрын

    Thanks so much, Amit! Glad you liked this 🙂

  • @shoppersdream
    @shoppersdream4 жыл бұрын

    Thanks! Very Nice! Today, your custom Formatting did not work. Normally It does work. What could be the reasons? There were roughly 300 records and it worked for roughly 150 but for rest, it didn't work. Thanks

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Hi, Peace. I’m sorry this didn’t work for you. I’m thinking that if this worked for half your numbers, but not the other half, that there may be a formatting issue with the ones that didn’t work. Can you go back and check them to see if they’re formatted as a number? Please let me know what you find. Thanks

  • @shoppersdream

    @shoppersdream

    4 жыл бұрын

    @@YAcostaSolutions Thanks for your reply. I checked it and I noticed that all are General. None of them is formatted as a number. Half of them I was able to change using your method but the other half does not add preceding zero's. After wasting a lot of time, I tried your IF Method and that worked fine. Thanks

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Awesome! Except I’m truly sorry about the time you ended up wasting. But happy that you got it resolved.

  • @PrettyVette34
    @PrettyVette343 жыл бұрын

    Question: when I tried this it didn't work and I followed the exact step.

  • @hassananber9127
    @hassananber91272 жыл бұрын

    الف رحمة ع موتاج

  • @AmeerAlDroubi
    @AmeerAlDroubi4 жыл бұрын

    the lesson starts at 3:45

  • @amrifath
    @amrifath4 жыл бұрын

    How to combine 2 cell with zero in front of a number in excel without change their value?

  • @YAcostaSolutions

    @YAcostaSolutions

    4 жыл бұрын

    Hello, Hanif. This is an interesting question that I hadn't really thought about before! Whichever option you use to combine cell contents (ampersand, CONCAT, / CONCATENATE, or TEXTJOIN), you'll need to add, in quotation marks, the number of zeros you want in the front. For example, if you want your result to have 2 zeros in front: -Using the ampersand: ="00"&A1&B1 -Using CONCAT or CONCATENATE: CONCATENATE("00",A1,B1) In case you are interested, here is a link to a tutorial I did on using the ways I mentioned above to combine cell contents: kzread.info/dash/bejne/hWirqLyGnq21frg.html Please let me know if you have more questions. Thanks!

  • @amrifath

    @amrifath

    4 жыл бұрын

    @@YAcostaSolutions Thanks a bunch for your attention. In my case there are 2 number which are "00240" and "03418" i want to combine theme into "00240 03418" in one cell. Should it possible in excel?

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Hi, Hanif. I’m so sorry I didn’t respond sooner. I’m only just now seeing your response. Yes, you’re able to combine the values, but it’s a bit tricky. The easiest option, in my opinion, would be to use the TEXT function to apply custom formatting to each cell via the formula and combine them this way. It would look something like this: =TEXT(A1,"00000")&" "&TEXT(B1,"00000") *The quotation marks can be a bit touchy. For example, mine only work when I type them on my laptop. The ones on my phone are formatted slightly different and don’t work. So, if you copy and paste this and it doesn’t work, retype your quotation marks when in Excel. Here’s a link to my tutorial on the TEXT function if you’d like to understand it a little better: kzread.info/dash/bejne/oKqlqM-PesS0ctI.html You can also use CONCAT or CONCATENATE, but I think that’s harder for this because you have to put more thought into how to format each cell that you’re combining. But, if you use either of those, the formula would look like: =CONCATENATE("00",A1," ","0",B1) - where A1 has the cell with 2 zeros in front and B1 has the cell with 1 zero in front. I hope this helps (and that it's not too late to be helpful). Please let me know if you have more questions. Thanks

  • @amrifath

    @amrifath

    3 жыл бұрын

    @@YAcostaSolutions Thanks for your help. I can combine them with text command.

  • @YAcostaSolutions

    @YAcostaSolutions

    3 жыл бұрын

    Awesome! Happy it worked for you 🙂

  • @pushkarnayakpn
    @pushkarnayakpn2 жыл бұрын

    WE DOSE NOT USE FORMULA ON ZERO VALUE DIGIT WITH

Келесі