

For example, if I want my negative numbers to show up in red color or I want my dates to show up in a specific format then how do I do that. Now the default setting is alright, but how do you change the format. Where each data type is formatted as General (and follow the rules I mentioned above, based on whether it’s a positive number, negative number, 0, or text) So by default, the cell’s number formatting is: General General General General Text is shown as is (aligned to the right)Īnd in case you enter a date, it’s shown based on your regional setting (in DD-MM-YYYY or MM-DD-YYYY format).Zero is shown as 0 (and aligned to the left).Negative numbers are shown with a minus sign (and aligned to the left).Positive numbers are shown as is (aligned to the left).Then you open a new Excel workbook, by default all the cells in all the worksheets in that workbook have the General format where: For now, just keep in mind that this is the syntax for the format for any cell How Custom Number Format Works in Excel

How this works and where to enter these formats are covered later in this tutorial. If you want to learn more about custom number formatting, I would highly recommend the Office Help section. Three Formats: The first one is applied to positive numbers, the second one is applied to negative numbers, the third is applied to zero, and the text disappears as nothing is specified for text.Two formats: The first one is applied to positive numbers and zeros, and the second one is applied to negative numbers.For example, if you just write General, it will be applied for all four sections. One format: It is applied to all four sections.Note that all these are separated by semi-colons ( ).Īnything that you enter in a cell in Excel would fall in either of these four categories and hence a custom format for it can be specified. Another data type that Excel can accept is dates, but since all date and time values are stored as numbers in Excel, these would be covered as a part of the positive number.įor any cell in a worksheet in Excel, you can specify how each of these data types should be shown in the cell.Īnd below is the syntax in which you can specify this format.
