Use Text Format to Preserve Leading Zeros in Excel [Quick Tip]

Share

Facebook
Twitter
LinkedIn

Here is a quick tip to add awesome to your Wednesday.

If you want to enter numbers like 00023 or 023.340 or 23.34500 in your Excel sheet, you would notice that Excel magically removes leading zeros and trailing zeros (after decimal point) as the number 23 is same as 00023. But sometime, we want 00023, not 23. Then what?!?

Very simple, we use TEXT format instead of number format. Just select the cells where you are going to enter these numbers, and from Home ribbon > Number area, select “Text” as cell type. This tells Excel to treat any value you enter as Text, not as number. So when you type 00023, it will appear as 00023.

See this short demo to understand how to get this work.

How to preserve leading zeros in a cell - Excel Tutorial

Bonus Tip – Use fixed number of zeros

Applying Fixed Digit Formatting to Numbers in ExcelFor example, if you want the number to show up in 5 digits (with leading 0s if needed), you can use the cell format code 00000.

To apply this format:

  • Just select the cells and press CTRL+1
  • From Number tab choose “Custom”
  • Enter the format code as 00000
  • Done!

Aside, you can see how this formatting works.

That is all for now. Have a great evening then 🙂

More on Cell Formatting

Excel allows you to format cells in myriad ways, some of which may baffle you. But Chandoo.org got your back! We have written several articles to help you master the cell formatting. Read on,

PS: We had a minor hiccup with our newsletter. Many of you did not get it for last 7 days. It is fixed now. So you might get one big email from Chandoo.org with all the missed posts.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

8 Responses to “Top 5 keyboard shortcuts for Excel Charts”

  1. Michael (Micky) Avidan says:

    As far as I remember (checked, again, 2 minutes ago) in my "Excel 2013" in order to select various chart elements I need to use the Arrow keys and not the TAB key.
    Practically, the TAB key does nothing (within a Chart).
    ----------------------------
    Michael (Micky) Avidan

    • Chandoo says:

      Thanks for pointing this out. This is how I remember it too, but when I was recording the video yesterday, only TAB key worked. MS must have changed the keys in Excel 2016. I have edited the post to include both keys.

      • Andy Pope says:

        The key navigation on charts is different in 2016.

        TAB cycles through a layer of objects (SHIFT+TAB cycles backwards)
        ENTER move down a layer
        ESC moves up a layer

        So on a column chart with title/legend/data labels if you select the plotarea the TAB will go through Title > Legend > Plotarea.
        ENTER at plotarea will then select Vertical axis. Tab will take you through
        Horizontal axis > gridlines > Series > Horizontal Axis.
        ENTER with series selected will then allow you to TAB through individual data points and data labels.
        If you ENTER on datalabels you can TAB through each data label.

  2. GraH says:

    ALT + F1 : to create default chart
    ALT+E S T = CTRL + ALT + V, T : I find that easier to remember

    I second what Michael already said about TAB and arrow keys. I can't help but think if this is related to the "," or ";" as separator. I prefer to use the chart tools - layout- drop down box, anyway.

  3. Mike W says:

    Got to be F11 for instant charting. Highlight your data , hit F11 and voila! ?

  4. Jon Peltier says:

    Ctrl+1 is the most important chart shortcut. In fact, it works for any Excel object: whatever is selected, Ctrl+1 opens the task pane or dialog to format that object.

    Somewhere along the line, maybe when Excel 2016 came out, the arrow keys stopped working to cycle through the elements of a chart. But what works is holding Ctrl while clicking the arrow keys. I haven't gotten used to the Tab and other keys, but as long as Ctrl+Arrow works, I'm good.

    And F4 used to be so helpful when formatting a lot of charts. But since Excel 2007 came out, it has been mostly useless. It used to remember a whole set of changes at once, so I get that the newer modeless dialogs make that impractical. But now it only seems to work with formatting of lines and borders, and maybe fills. I find myself writing a lot of VBA one-liners in the Immediate Window to handle these tedious formatting tasks.

  5. Shelia Hollis says:

    after clicking on a chart, is there a shortcut key to copy it?

  6. Thank you for the Alt E S T - tip. This is more than a time saver. Because of dynamic charts or de-activated external references to data when you make the charts, you often have empty charts that are otherwise impossible to format. So this shortcut helps adressing that. I will work with it more and see if there remain some obstacles.

Leave a Reply