Two different number formats in one cell based on what is entered into that cell

Anonymous
2019-10-15T01:51:39+00:00

Hi, I'm trying to create an index sheet that displays page numbers/page names for a set of blueprints. The current sheet index template that my company uses is not very user friendly (hence why I'm trying to make a new one). I've been trying to format the "Page No." column to display numbers differently depending on how they are entered. For example:

If I enter a singular number like "1"

-It should display as "01"

If I enter a range of numbers, like "03-04"

-It should display as "03-04"

I included a picture to show what I want the end result to look like.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2019-10-15T02:39:28+00:00

    Do this:

    • Right click the column A and then click "Format Cells"
    • At "Number" tab Select "Custom" category (the last one)
    • At the text box, type 00, then click OK
    • That should work: All numbers from 0 to 99 will have two digits, and page ranges will work fine.
    • For the page range cases, I'd also recommend you to always put the single quote before typing two numbers (Ex.: '03-04 instead of 03-04). This way, you avoid Excel treating the input as a date format

    0 comments No comments
  2. Anonymous
    2019-10-15T03:22:28+00:00

    Hi I am an independent advisor and hoping to help you today.

    You may try to refer to the answer of Danilo in the community,

    https://answers.microsoft.com/en-us/subject/for...

    Thank you

    0 comments No comments