How to change a number in an excel cell. The cell format does not change. Number format options in Excel

The cell format in Excel is not easy to set appearance displays the data, but also tells the program itself exactly how it should be processed: as text, as numbers, as a date, etc. Therefore, it is very important to install correctly this characteristic the range in which the data will be entered. Otherwise, all calculations will simply be incorrect. Let's find out how to change cell format in Microsoft Excel.

Let’s immediately determine what cell formats exist. The program offers you to choose one of the following main types of formatting:

  • General;
  • Monetary;
  • Numerical;
  • Financial;
  • Text;
  • Date of;
  • Time;
  • Fractional;
  • Percentage;
  • Additional.

In addition, there is a division into smaller structural units of the above options. For example, date and time formats have several subtypes (DD.MM.YY., DD.month.YY, DD.M, H.MM PM, HH.MM, etc.).

There are several ways to change cell formatting in Excel. We will talk about them in detail below.

Method 1: Context Menu

The most popular way to change data range formats is to use the context menu.


After these steps, the cell format is changed.

Method 2: Number toolbox on the ribbon

Formatting can also be changed using the tools found on the ribbon. This method is even faster than the previous one.


Method 3: Cells toolbox

Another option for setting this range characteristic is to use the tool in the settings block "Cells".


Method 4: Hotkeys

Finally, the range formatting window can be called up using so-called hot keys. To do this, you need to first select the area to be changed on the sheet, and then type the combination on the keyboard Ctrl+1. After this, a standard formatting window will open. We change the characteristics in the same way as mentioned above.

In addition, certain hotkey combinations allow you to change the cell format after selecting a range, even without calling a special window:

  • Ctrl+Shift+-— general format;
  • Ctrl+Shift+1— numbers with a separator;
  • Ctrl+Shift+2— time (hours.minutes);
  • Ctrl+Shift+3— dates (DD.MM.YY);
  • Ctrl+Shift+4– monetary;
  • Ctrl+Shift+5– interest;
  • Ctrl+Shift+6— format O.OOE+00.

As you can see, there are several ways to format areas of an Excel sheet. This procedure can be accomplished using the tools on the ribbon, calling the formatting window, or using hotkeys. Each user decides for himself which option is most convenient for him in solving specific problems, because in some cases it is enough to use general formats, while in others, precise specification of characteristics by subtype is required.


Graphs and Charts (5)
Working with VB project (12)
Conditional Formatting (5)
Lists and ranges (5)
Macros (VBA procedures) (63)
Miscellaneous (39)
Excel bugs and glitches (3)

Cell format does not change

Once again on one of the forums I saw a question describing an incomprehensible bug: when trying to change the cell format or call the Format Cells dialog box (right mouse button - Cell Format Nothing happens. Which makes it impossible to change the visual style of cells. At the same time happen this problem maybe not for all cells, but selectively for any cell of the sheet. If someone does not understand the problem: for some cells it is impossible to assign or change cell borders, fill color, font color and style, etc.

Possible reason: at some point when working with a file, a format conflict occurred in the cells and the cell style was blocked. Typically this happens when working with a file in Excel versions 2007 and up. I assume that this is due to the fact that in new file formats, data on cell formats is stored in XML schemas and sometimes when changes occur, a style conflict occurs and Excel cannot determine the current cell format and, as a result, change it. I can’t say 100% whether this is really the reason, but I don’t have any other options yet. You need to find out from Microsoft, but none of the “owners” of the problem can say at what moment the reason appeared, and without this it is unlikely to be able to dig up anything. I myself could not simulate such a situation.

Solution: I know two so far possible options solutions to this problem. Which one to use if you encounter this problem is up to you to choose.

Denial of responsibility: You perform all actions at your own peril and risk. The author of the article does not bear any responsibility for any kind of damage that may be incurred as a result of your actions
Therefore, I strongly recommend that you try solutions to problems on copies of your files in order to save your data in any case.

option 1

That's it, now all that remains is to save the book. True, there is a nuance here: with this approach, all formats will also be deleted, even those cells with which there were no problems (cell fill, font color and style, borders, etc. will be removed).
This option is the most effective, because removes all formats from the book and the possibility of the problem repeating in the near future is very low.

Option 2

  1. copy any cell for which the format changes without problems
  2. select “unruly” cells - right mouse button - Special paste (PasteSpecial) - Formats

This option (in books kindly provided by the problem carriers) worked quite well for me. What is its obvious advantage over the first option - you do not lose all the formats in the book. However, there is another nuance - it will not be possible to say with certainty that the problem will not recur in the very near future. Although it cannot be said that it will happen again.

Did the article help? Share the link with your friends! Video lessons

("Bottom bar":("textstyle":"static","textpositionstatic":"bottom","textautohide":true,"textpositionmarginstatic":0,"textpositiondynamic":"bottomleft","textpositionmarginleft":24," textpositionmarginright":24,"textpositionmargintop":24,"textpositionmarginbottom":24,"texteffect":"slide","texteffecteasing":"easeOutCubic","texteffectduration":600,"texteffectslidedirection":"left","texteffectslidedistance" :30,"texteffectdelay":500,"texteffectseparate":false,"texteffect1":"slide","texteffectslidedirection1":"right","texteffectslidedistance1":120,"texteffecteasing1":"easeOutCubic","texteffectduration1":600 ,"texteffectdelay1":1000,"texteffect2":"slide","texteffectslidedirection2":"right","texteffectslidedistance2":120,"texteffecteasing2":"easeOutCubic","texteffectduration2":600,"texteffectdelay2":1500," textcss":"display:block; padding:12px; text-align:left;","textbgcss":"display:block; position:absolute; top:0px; left:0px; width:100%; height:100% ; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);","titlecss":"display:block; position:relative; font:bold 14px \"Lucida Sans Unicode\",\"Lucida Grande\",sans-serif,Arial; color:#fff;","descriptioncss":"display:block; position:relative; font:12px \"Lucida Sans Unicode\",\"Lucida Grande\",sans-serif,Arial; color:#fff; margin-top:8px;","buttoncss":"display:block; position:relative; margin-top:8px;","texteffectresponsive":true,"texteffectresponsivesize":640,"titlecssresponsive":"font-size:12px;","descriptioncssresponsive":"display:none !important;","buttoncssresponsive": "","addgooglefonts":false,"googlefonts":"","textleftrightpercentforstatic":40))

Instructions

By default, Excel applies a format called “generic” to each table cell. It implies that an equal sign at the beginning of the cell's contents means that a formula is placed in it. This is inconvenient if in fact the equal sign is only part of the text. In such cases, the spreadsheet editor usually shows an error message in . You can fix the problem by changing the cell format to “text”. To do this, start by highlighting the desired area of ​​the table - a column, row, or specific group of cells.

Open the drop-down list placed on the top line of the “Number” command group on the “General” tab of the application menu. Scroll to the bottom and select the bottom line - “Text”. The same can be done in another way - right-click the selected range and select the “Format Cells” line in the context menu. Click the Text line in the Number Formats list and click OK. This will complete the procedure.

If your cells are showing formulas instead of formula results, you may need to change one of the following: Excel settings. To do this, go to the “Formulas” tab and click on the “Show Formulas” icon - it is located to the right of the “Influencing Cells” inscription in the “Formula Dependencies” command group. This icon should be highlighted in yellow when enabled.

This defect can be repeated every time the document is opened if this option is fixed in the Excel settings. To change the corresponding setting, open the main menu of the table editor and select “Options”. In the list of sections, click on the “Advanced” line and scroll the list of settings to the “Show options for the next sheet” subsection. In the “Show formulas, not their values” box, uncheck the box and click OK. When closing a document, do not forget to save it so that the situation does not repeat itself the next time you load it into a spreadsheet editor.

Sources:

  • Replacing formulas with calculated values ​​in Excel 2013

Excel makes it possible to perform various calculations, including analytical ones. The program allows you to create your own formulas or use built-in functions. But often it is necessary to preserve the final result in a “stable” form. Or you simply don’t want another user to see the formulas used for the calculations. In these cases, use storage as values.

Instructions

Click the right mouse button. A context menu will appear. Activate the “Copy” item in it, and around the cell should appear dotted frame. Right-click again. In the list that appears again, select the “Paste Special” line. A new window will open with insert options. With the left mouse button, select the “values” or “values ​​and number formats” item. Then click the "OK" button. You will see that a result number appears in the function line instead of a formula.

You can change formulas to values ​​in several cells at once. To do this, you first need to select these cells, and then repeat the steps described in step 2.

In order to change formulas to values ​​in an entire row or column, you must first select the entire corresponding area. To do this, move the cursor to the top border of the sheet with the names (letters) of the columns or the left border with the line numbers and set it at the desired level so that the cursor turns into a black arrow. Then click on left button mouse and you will see that the entire row (column) is highlighted. Follow the algorithm from point 2 of this instruction.

If you want to save all calculations in a worksheet as values, move your cursor to the upper left corner of the worksheet. When you see the corner square highlight, click the left mouse button. This will select the entire work area. Repeat the sequence of steps from step 2.

note

After saving the file with “values”, you will not be able to restore the formulas used for the calculations. Therefore, it is better, just in case, to make a copy of the source file and save it without formulas.

The number of known chemical compounds is in the millions. As science and production develop, there will be more and more of them, and even the most qualified specialist will not be able to remember them all. But you can learn to compose formulas yourself, and this will allow you to navigate the world of chemical compounds much more confidently.

You will need

  • - periodic table D.I. Mendeleev;
  • - salt solubility table;
  • - the concept of valency.

Instructions

Consider the periodic table of chemical elements by D. I. Mendeleev. You will see that all the elements there are distributed into groups. Each group occupies a specific column. In the top line of the table you will see Roman numerals. They indicate the group number and at the same time are an indicator in each column.

The program has a formula bar. When you enter data and arithmetic symbols, the contents of the cell are simultaneously reflected in this row. Once you have entered everything you need, press Enter. Look at the status bar. The message “Ready” should appear there. If you leave this cell and select another one, the status bar will disappear. It will appear again as soon as you enter this cell again.

Microsoft Excel allows you to enter not only simple formulas, but also those that contain links. For example, you need to perform actions with data located in two cells. Select the cell where you will paste the formula. As in the first case, enter the “=” sign into it. Pay attention to the status bar, where “Enter” should appear.

Position the mouse in the cell from which the data will be applied. Click. The link should appear in the formula bar and in the first cell. Control the process line by line. The word “Specify” should appear there. Place the icon for the desired arithmetic operation, and then click on next cell. In the status bar, you will first see the word “Enter” again, and then “Specify”. Press Enter. Don't forget to look at the status bar. After you enter the formula into the desired cell, the result will appear there. will appear in the status bar as soon as you select this cell.

Quite often there is a need to edit the formula. This can be done in two ways - directly in the cell or in the status bar. To change the formula in the status bar, select the cell. Go to the line where the desired formula should be displayed at this moment. Replace all or some part of it.

Video on the topic

note

In the electronic editor OpenOffice tables the formula is entered in a similar way.

Helpful advice

To make edits directly in a cell, in the “Edit” tab, find the “Options” window, and in it, the “Tools” menu. Select editing mode, highlight the desired cell and press F2. You can also go the other way by first converting the formula to text, and then, after changing it, back to a formula. To do this, just remove and put the equal sign in front of the expression again.

In a programme Microsoft Office Excel's main tool for processing and analyzing table data is formulas. To optimize processes, the application has a large number of simple and complex functions built into it that can be called by the user in formulas and applied to values ​​entered into cells.

Instructions

A formula in Excel can include numeric and text values, logical and mathematical operations signs, references to other cells, and calls to functions. The result of the calculation can be either numeric values ​​or logical values ​​– True/False.

When calculating a formula, the program uses the same procedure as in mathematics. Each formula begins with an equal sign and ends with the Enter key. The one used is displayed in the formula bar, but only the result of calculations is visible in the cells.

You can either enter the formula yourself or choose one of the built-in functions. Place the mouse cursor in the cell in which you want to get the result and go to . If you want to set the formula yourself, press the [=] key on your keyboard and, using mathematical and other symbols, enter the desired formula, indicating the names of the cells in the format A1, B2, and so on.

So, to calculate the sum of the data in the range of cells B1, B2, B3 and B4, the formula will look like this: = B1+B2+B3+B4. When specifying cell addresses, lowercase letters can be used. After water formulas, the program automatically converts them.

If you want to use built-in functions, enter an equal sign in the formula bar, refer to the field located at the right edge of the formula bar. Use the drop-down list to select the function that suits your case.

If the required function is not in the list, select the last item “Other functions” in the context menu, a new dialog box will open. Use the Select Feature and Category groups to find the option that suits you. When you decide, confirm your actions with the OK button or the Enter key.

A new Function Arguments window will appear. Enter the names of the cells to which the formula should be applied in the empty field, or select them in work area sheet using the mouse. When you have finished making your selection, press the Enter key or the OK button in the dialog box.

An alternative the last method is clicking the fx button in the formula bar. It calls up the “Function Wizard”, in the window of which you need to select the formula that is suitable for your case, enter or use the mouse to specify a range of cells with data and press the Enter key or the OK button.

Video on the topic

Sources:

  • how to apply a formula to a column

You can see the formula placed in a cell of a Microsoft Office Excel spreadsheet if you turn on the editing mode. It is also displayed in the formula bar of the open worksheet. However, sometimes it is necessary to look at the algorithm for calculating values ​​not in a single cell, but in all cells of the table. Excel provides the ability to replace the display of values ​​in rows and columns with formulas that calculate them.

When filling out sheets Excel data, no one can immediately fill out everything beautifully and correctly on the first try.

While working with a program, you constantly need something: change, edit, delete, copy or move. If erroneous values ​​are entered into a cell, naturally we want to correct or delete them. But even such a simple task can sometimes create difficulties.

How to set cell format in Excel?

The content of each Excel cell consists of three elements:

  1. Meaning: text, numbers, dates and times, logical content, functions and formulas.
  2. Formats: type and color of borders, type and color of fill, method of displaying values.
  3. Notes

All these three elements are completely independent of each other. You can set the cell format and not write anything into it. Or add a note to a blank and unformatted cell.



How to change cell format in Excel 2010?

To change the cell format, call the corresponding dialog box using the key combination CTRL+1 (or CTRL+SHIFT+F) or from the context menu after right-clicking: the “Format Cells” option.

There are 6 tabs available in this dialog box:


If you do not achieve the desired result on the first try, call this dialog box again to correct the cell format in Excel.

What formatting is applicable to cells in Excel?

Each cell always has some format. If there have been no changes, then this is the “General” format. It is also standard Excel format, in which:

  • numbers are aligned to the right;
  • text is aligned to the left;
  • Colibri font with a height of 11 points;
  • The cell has no borders or background fill.

Removing a format is a change to the standard “General” format (no borders or fills).

It is worth noting that the format of cells, unlike their values, cannot be deleted using the DELETE key.

To remove the format of cells, select them and use the “Clear Formats” tool, which is located on the “Home” tab in the “Editing” section.

If you want to clear not only the format, but also the values, then select the “Clear all” option from the tool (eraser) drop-down list.

As you can see, the eraser tool is functionally flexible and allows us to make a choice of what to delete in cells:

  • content (same as DELETE key);
  • formats;
  • notes;
  • hyperlinks.

The Clear All option combines all these functions.

Deleting notes

Notes, as well as formats, are not deleted from a cell using the DELETE key. Notes can be deleted in two ways:

  1. Using the eraser tool: Clear Notes option.
  2. Right-click on the cell with the note, and from the context menu that appears, select the “Delete note” option.

Note. The second method is more convenient. If you want to delete multiple notes at once, you should first select all of their cells.

Excel provides a lot of built-in number formats, but there may be situations in which none of them will work for you. In this case, try creating your own (custom) number format. To do this, while in a cell, right-click and select from the context menu Cell Format. A dialog box will open Cell Format(Fig. 1). Go to the tab Number. Window Cell Format can also be called up by pressing Ctrl+1 or using the ribbon (menu home), by clicking on the arrow in the lower right corner of the group Number(Fig. 2).

Rice. 1. Window Cell Format

Download the note in or format, download examples in format

Rice. 2. Calling a window Cell Format using tape

Some Excel users try to avoid creating their own number formats because they find the process too labor-intensive. In fact, the complexity of custom number formats has been greatly exaggerated.

To create a number format, you must specify a series of codes as a number format string. To create a custom number format, follow just three steps:

  1. Press Ctrl+1 to open the dialog box Cell Format.
  2. Click on the tab Number and select a category on it (all formats).
  3. Enter your own format in the field Type.

This is where some difficulties arise, since they require you to know the format encoding in Excel. But... Firstly, this encoding is easy to master by analogy. To do this, just look at how standard formats are encoded. Secondly, the syntax of the codes is not that complicated, which I hope to show you in this post. And finally, having mastered coding, you will feel like you have moved to a new level of Excel proficiency!

Format code sections

Number formats can have up to four code sections, separated by semicolons. These sections define the format of positive, negative, null values, and text. And, exactly in that order. Why do users rarely notice such a complex format structure? The fact is that most standard formats contain only one section - for displaying any content. This means that negative numbers or text will be displayed in the same format as positive numbers. For example, if you enter a positive number, a negative number, a zero, and text in different cells, Excel will apply the default format - General(Fig. 3).

Rice. 3. Format General

However, not all standard formats have one section. For example, by selecting the numeric format and the fourth type (bottom), you will “paint” negative numbers red (Fig. 4).

Rice. 4. Format Numerical, type four: negative numbers – in red

To see how Excel encodes a particular standard format, first select that format (for example, as in Figure 4), and then click on (all formats). In area Type, you will see that the format contains two sections separated by a semicolon (Figure 5). Don't be alarmed that most of the code symbols are not yet clear to you. You will soon learn what they mean. For now, just note that the format contains two sections:

2) [Red]-# ##0.00\ ˽

The first is for positive numbers, the second is for negative numbers. I use the symbol ˽ to denote a space.

Well, it's time to create your first custom format. Let's say you want to display numbers in the format Account No. 56-789(Fig. 6). Please note that this is exactly the number display format. For example, cell A1 contains the number 56789. I entered several values ​​in cells A1:A4 and similar values ​​in cells B1:B4. I will leave cells A1:A4 untouched (for comparison), and format B1:B4. The format contains four sections: "Account No." 00-000; "cannot be negative" ; "cannot be null" ; "do not enter a hyphen". Thus, when a positive number is entered into a cell, a record like Account No. 23-456, if you enter a negative number, zero, or text (and the value 56-792 for Excel is text), an entry will appear indicating an input error.

It is not necessary to set all sections of the code for a custom number format. If only two sections are specified, the first is used for positive numbers and zeros, and the second is used for negative numbers. If only one section is specified, it applies to all numbers. If you want to skip a section of code but include the section that follows it, you must leave a semicolon for the section you are skipping. For example, format
# ##0;;; " enter the number " will display only positive numbers (for negative numbers and zero the cell will appear as empty), and if you enter text in the cell, the entry will be displayed enter the number.

The text section should always be the last section of the number format. To ensure that text entered into a cell appears on the screen, you must place the @ sign in the appropriate place in the text section. If the text section does not contain an @ sign, the text you type in the cell will not appear on the screen. To have the text you enter complete with certain characters, enclose those characters in double quotes(" "), for example, "gross income per " @. If the format does not have a text section (for example, the format is used General), then the format has no effect on non-numeric values ​​entered into the cell. That is, the text will be displayed as entered. In addition, the entire cell is converted to text, i.e., aligned to the left. Study fig. 7; I also recommend opening the corresponding sheet of the Excel file.

The last example may be confusing, but note that the format code (cell B4) is missing the @ symbol, which specifies where the text entered into the cell should appear. Those. the contents of cell C4 will remain constant no matter what text is entered into cell A4.

Basic number display codes

# The main symbol for displaying a number. Shows only significant digits, and does not display leading zeros on either side of the separator.
0 (zero) Similar to the # character, but displays leading zeros on either side of the separator if the number has fewer digits than zeros in the format.
? Similar to zero, but displays spaces for leading zeros on either side of the separator. In a monospace font, aligns numbers relative to the separator. Also used in fractions with a variable number of digits.
, (comma) Sets the display of the decimal separator for Russian Excel (a dot is used for English Excel).
space) Between numeric signs (#, 0 or?) specifies the division into groups of digits (thousands). When used after all numeric digits, each space is equivalent to division by a thousand.

Note. The # symbol is a joker for a number, i.e., it indicates the display location of the numbers entered in the cell. Similarly, the @ symbol is a wild card for text, i.e., it indicates where the text entered in the cell will be displayed.

For a better understanding, consider the examples (Fig. 8). Please note that when you enter the format code, in accordance with the instructions in the figure, it is reflected exactly in this form. If the entered format code corresponds to some standard format, then the next time you view the format (when opening the window Cell Format) Excel will show that the cell contains this standard format. To go back to editing the format code, select the line in the window (all formats).

If the fractional part of a number has more digits than placeholders in the format, the number is rounded to a number of digits equal to the number of placeholders. If there are more digits in the integer part of a number than there are placeholders in the format, the extra digits are displayed. If the format contains only number signs # or ? to the left of the decimal point, then numbers less than 1 will begin with a comma.

Including text elements in format code

To display text and numbers in a cell, enclose the text characters in double quotation marks (" ") or precede the individual character with a backslash \. Add characters to the desired section of the format code. For example, enter the format "Excess" 0.00 rub.; "Shortage" -0.00r., so that positive values ​​are displayed in the format "Excess 125.74r.", and negative values ​​in the format "Shortage -125.74r.". Note that there is a space after the words "Excess" and "Deficient" in the corresponding sections of the code. The signs shown in Fig. 9, do not require quotation marks.

Rice. 9. Characters that can be entered into the format code without quotes

Using the characters from Table 9 in format code should not be confused with using them in a cell as a formula element. As part of the format code, these characters are simply displayed. In Fig. 10 you can see that the value 25 is entered into the cell. Everything else is just a display format.

In addition to the dollar sign, Excel allows you to enter several other currency symbols without quotes. They can be entered either before or after the number. To include one of the following currency symbols in the number format, press the NUM LOCK key and enter the ANSI code for the corresponding symbol using the numeric keypad.

To enter a single character in the format code, precede it with a backslash \. Moreover, because quotation marks " tell Excel to begin entering text, to reflect the quotation mark character in the format code, precede them with a forward slash \ " .

Set color

You can set the color for the format section in one of two ways:

  • enter the name of one of the following eight colors in square brackets: [Black], [White], [Red], [Green], [Cyan], [Yellow], [Purple], [Blue];
  • enter [COLORn], where n is a number from 1 to 56 and corresponds to one of the colors in the palette; the first eight colors correspond to the list from the previous paragraph (in that order); You can get acquainted with the rest of the colors in the palette, for example, .

The color code must be the first element in the section. An example of color use will be given below.

Use in test condition format

If the format should be applied only when the number meets certain conditions, specify the condition in square brackets [conditional value]. The condition consists of a comparison operator and a value (Fig. 12). In the first case, the format checks whether the value falls within the range from 0 to 1, and displays the value as a percentage; otherwise, text about the invalid value is displayed. In the second case, numbers less than 100 are displayed in red, and more - in blue. It is curious that I was unable to introduce the third condition. Excel may only support two conditions per format.

Some additional features formatting

Sometimes there is a need to align numbers in cells. To create a space with a width equal to the width of a character in number format, add the appropriate character, preceded by an underscore _. For example, if the underscore is followed by a right parenthesis _), positive numbers will be arranged in the same column with negative numbers enclosed in parentheses (Figure 13).

To fill the entire width of a cell with a specific character, precede it with an asterisk * in number format. For example, to fill the empty area of ​​the cell to the right of the number with arrows, you should specify #*→, to add underscores *_# before the number (Fig. 14).

Sometimes it is necessary to reflect separately rubles and kopecks (dollars and cents, etc.). Formatting methods allow you to access the same number stored in a cell several times, sequentially displaying its parts, for example:

Above (see Fig. 8) we showed that a space after a number code is equivalent to dividing by a thousand. The technique just discussed for dividing into rubles and kopecks can be used to scale a number in the hundreds. This is useful for measures such as hundredweight, as well as for converting centimeters to meters (Figure 16). It is curious that Excel has an undocumented feature that allows you to enter quite a lot of text without quotes (although some letters in both the Russian and English alphabet still do not work). In Fig. 16 I gave two such examples.

Rice. 16. Number scaling techniques and more

Remember that custom formats are saved with the workbook. When you open a new workbook, you will have to create custom formats again. You can simplify the task if you copy from the old workbook and paste it into a new “correctly” formatted cell.

Important! As you work on creating your own number format, don't forget about the field Sample(see, for example, Fig. 6). In this field you see the value of the active cell, depending on the format string written in the field Type. Be sure to test your custom number formats against the following data: positive value, negative value, null value, text. You often fail to create your own number format on the first try. Whenever you edit a format string, it is added to the list (Figure 17). When you finally make a string that meets all your requirements, open the dialog box Cell Format, highlight and delete the results of previous unsuccessful attempts.

Date and time format codes

To display numbers in date format (with day, month and year), use the codes below.

To display values ​​in time format (indicating hours, minutes and seconds), the codes shown in Fig. are used. 19. Comments are shown in Fig. 20. Note that to display values ​​greater than 24 for hours and 60 for minutes and seconds, use codes in rectangular brackets, such as [h]. Using the standard format - h - when moving after 24 hours will change the date, but the hour value will always remain in the range 0-23.

Rice. 20. Comments on the use of codes for formatting time (note that the first row of the table is not a header; this is simply an inaccuracy of Microsoft in the design of the table :))

We complete the review with examples of using custom date and time formats (Fig. 21).