Internet Windows Android

How to remove zeros in Excel. How to remove division by zero error in Excel using formula

When using formulas in Excel, if the cells referenced by the operator are empty, the calculation area will have zeros by default. Aesthetically, this does not look very nice, especially if there are a lot of similar ranges with zero values ​​in the table. And it is more difficult for the user to navigate the data compared to the situation if such areas were generally empty. Let's find out in what ways you can remove the display of null data in Excel.

Excel provides the ability to remove zeros in cells in several ways. This can be done either by using special functions or by applying formatting. It is also possible to disable the display of such data as a whole for the sheet.

Method 1: Excel settings

Globally, this issue can be solved by changing the Excel settings for the current sheet. This allows you to make absolutely all cells containing zeros empty.


After these steps, all cells of the current sheet that contain zero values ​​will be displayed as empty.

Method 2: apply formatting

You can hide the values ​​of empty cells by changing their format.


Now all areas that contain null values ​​will be empty.

Method 3: conditional formatting

You can also use a powerful tool like conditional formatting to remove extra zeros.


Now, provided that the value in the cell is zero, it will be invisible to the user, since the color of his font will merge with the background color.

Method 4: using the IF function

Another option for hiding zeros involves using the operator IF.


By the way, if in the window of arguments in the field "Value if true" set a dash, then when displaying the result in cells with a zero value there will be not a space, but a dash.

Method 5: using the ISNUMBER function

The following method is a kind of combination of functions IF and ISNUMBER.


There are a number of ways to remove the digit "0" in a cell if it has a zero value. The easiest way is to turn off the display of zeros in Excel settings. But then it should be taken into account that they will disappear throughout the sheet. If you need to apply the shutdown exclusively to a specific area, then range formatting, conditional formatting and the use of functions will come to the rescue. Which of these methods to choose depends on the specific situation, as well as on the user's personal skills and preferences.

Have you ever had to import or enter data into Excel that contains leading zeros (for example, 00123) or large numbers (for example, 1234 5678 9087 6543)? These could be social security numbers, phone numbers, credit card numbers, product codes, account numbers, or postal codes... Excel automatically removes leading zeros and converts large numbers to exponential notation (for example, 1.23E + 15) so that they can be used in formulas and mathematical operations. This article explains how to save the data in its original format, which Excel treats as text.

Convert numbers to text when importing text data

To format individual columns as text when importing data into Excel, use the function Get and Transform (Power Query)

In Excel 2010 and Excel 2013, there are two ways to import text files and convert numbers to text. We recommend using Power Query (you need to download the Power Query add-in for this). If you can't download the Power Query Add-in, you can use the Import Text Wizard. In this case, the text file is imported, but the data goes through the same transformation steps as when importing from other sources such as XML, Internet, JSON, etc.

Applying a custom format to preserve leading zeros

If you need to solve this problem within the workbook because it is not used as a data source by other programs, you can use a custom or custom format to store leading zeros. This method is suitable for numeric codes with less than 16 digits. Numeric codes can also be formatted using hyphens or other punctuation marks. For example, to make phone numbers easier to read, you can add hyphens between the international code, area code, prefix, and other digits.

Instructions

Using the TEXT function for formatting

You can use the empty column next to it and the TEXT function to convert the data to the format you want.

Rounding credit card numbers

The maximum precision for numbers in Excel is 15 significant digits. This means that in any number with 16 or more digits, such as a credit card number, all digits after the 15th digit are rounded to zero. If the digital codes are 16 or more digits, you must use text format... To do this, do one of the following:

    Formatting a column as text

    Highlight the data range and press the keys CTRL + 1 to open the dialog Format > Cells... In the tab Number select format Text.

    Note: This method does not allow you to change the numbers that were entered earlier. It only affects numbers entered after the format was applied.

    Using apostrophe

    You can enter an apostrophe before the number ( " ) and Excel will treat it as text.

additional information

You can always ask the Excel Tech Community a question, ask for help in the Answers community, and also suggest new function or improvement on the website

Values ​​Displayed in Spreadsheet Cells Microsoft applications Office Excel are often formed as a result of the execution of the formulas written in them. The result of calculations can be zero value, which is undesirable to show in the cell. Zeros do not improve the overall perception of the totals, only if in other cells of the column the formulas display text rather than numerical values. Several methods can be used to solve this problem.

You will need

Instructions

1. To disable the display of zero values ​​in all cells of an open sheet Excel document, use one of the settings in all general settings spreadsheet editor. These settings are opened through the main menu - in the 2010 version, click on the "File" button to access it, and in the 2007 version there is a round Office button prepared for this. Click on the menu item "Options" (version 2010) or click the button "Excel Options" (version 2007).

2. Select the "Additional" section in the list and scroll the list of settings to the inscription "Show parameters for further sheet". Uncheck the box next to Show zeros in cells that contain zeros and click OK.

3. Another method allows hiding zero values ​​not in every sheet, but in an arbitrarily selected group of cells. Select the required area of ​​the table and click the selection with the right mouse button. In the pop-up menu, select the "Format cells" line, and in the left column of the window that opens, click on the bottom line - "All formats".

4. In the field under the "Type" label, enter the following sequence of characters: “0; -0 ;; @” (without quotes). If non-zero values ​​of the selection must be displayed with a certain number of decimal places, after any zero in this entry, add the corresponding number of zeros, separating them with a comma. For example, in order to set the precision to hundredths, this record should look like this: “0.00; -0.00 ;; @”. Then click OK and the zeros will no longer be displayed.

5. The 3rd method does not remove zero values, but paints them in the background color of the cell and thus makes them visible. This method uses conditional formatting - select the required column or a set of columns and click on the button with this name in the "Genres" group of commands. In the drop-down list, go to the "Cell selection rules" section and select the "Equal" line.

6. In the left margin of the form that appears, enter zero, and in the list in the right margin, select Custom Format. The "Format Cells" dialog will open, on the "Font" tab of which you need a drop-down list below the "Color" inscription - open it and in the color table select the shade of the cell background (usually white). Click OK in both open dialogs and the task will be completed.

Unfortunately, today work with a computer still does not take place on the tier of giving mental orders, and the information obtained as a result is approximately invariably denounced in the form of texts. We spend a large part of our "computing time" reading and writing texts with support for various kinds of applications. Consequently, the phrase “size matters” is in great demand in relation to texts on a computer screen.

Instructions

1. If too huge bothers you font web pages in the browser, it is allowed to reduce it by pressing the ctrl key and, without releasing it, turning the mouse wheel towards you - this method will change the scale of the page, including those used in it font ov. Exactly the same result is obtained by pressing the minus key while holding down the ctrl key.

2. If big font you need to replace more with small ones in the text Word document, then start by highlighting the desired fragment. If you need to reduce the size of each text, then you can use the ctrl + a keyboard shortcut for selection. Later, open the drop-down list “Size font a "in the" Font "group of commands on the" Basic "tab and select a lower number. It is allowed to press the key combination ctrl + shift + p instead of the drop-down list - it opens a separate window with settings font a, in which it is also allowed to change its size.

3. If you need to reduce a large font viewing texts in Word, without changing anything in the formats of the document itself, then this can be done by zooming out. In that word processor it is allowed to do this in the same way as in the browser - by rotating the mouse wheel towards yourself while holding down the ctrl key. In addition, at the bottom right of the window open document(in the "status bar") there is a slider, with the help of which it is also allowed to change the scale of the document display.

4. Get rid of too huge font a used operating system for inscriptions in the OS graphical interface, allowed by changing the screen resolution. In OS Windows Vista and Windows 7 for this you need to right-click on the "wallpaper" on the desktop and in the context menu, prefer the line "Screen resolution". Later, click on the "Resolution" button and, with the help of the slider, set the desired value. Then click the "Apply" button.

Excel makes it possible to make various calculations, including analytical ones. The program allows you to create your own formulas or use built-in functions. But it is often necessary to keep the bottom line in a "stable" form. Or you primitively do not want another user to see the formulas by which the calculations were carried out. In these cases, use storing as values.

Instructions

1. If you need to remove formula in one specific cell, place the mouse cursor on it and press the left key. The function bar (immediately below the toolbars) will display the formula used to calculate the value in the cell.

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

3. It is allowed to change formulas to values ​​in several cells at once. To do this, you need to select these cells in advance, and then repeat the steps described in step 2.

4. In order to change formulas to values ​​in each row or column, you must first select the entire corresponding area. To do this, move the cursor to the upper border of the sheet with the names (letters) of the columns or the left border with the line numbers and place it on the required tier so that the cursor turns into a black arrow. After that click on left button mouse and see that each row (column) is highlighted. Follow the algorithm from step 2 of this instruction.

5. If you need to save all calculations on the sheet as values, move the cursor to the left top corner sheet. When you see how the corner square is highlighted, press the left mouse button. As a result, each will stand out Workspace... Repeat the sequence of actions from step 2.

Note!
After saving the file with "values", you will not be able to restore the formulas by which the calculations were carried out. Consequently, it is more different, for each case, to make a copy of the initial file and save it without formulas.

Period and comma can act as a decimal separator. In most English-speaking countries, a period is used as such a separator, and in Russia - a comma. This is often associated with the need to replace periods with commas in a spreadsheet editor. Microsoft Office Excel.

You will need

Instructions

1. If point is set as a decimal separator in the settings of your spreadsheet editor, then you can change this in one of the sections of the panel Excel installations... To get to it, open the application menu. This can be done by pressing Alt key, and later it - the "F" button. In the Excel 2010 menu, Options is located in the penultimate line of the command list, and in Excel 2007, the Excel Options button is in the lower-right corner of the menu.

2. Select the line "Additional" in the left column of the settings panel and in the section "Editing options" find the line "Apply system separators". If there is a mark in the checkbox next to this label, then it is unthinkable to edit the field "Delimiter of integer and fractional parts" you need. Remove it, put a comma in the text field and click the OK button to commit the metamorphosis in the editor settings.

3. If you need to replace a comma in a specific cell in a spreadsheet, there are several methods to do this. First, select the required cell, then turn on the editing mode - press the F2 key or double-click this cell. Move the cursor to point and replace it with a comma. This can be done not in a cell, but in the formula bar - there, to enable the editing mode, just one click is enough.

4. To completely replace all periods in all cells of the spreadsheet with commas, use the Find and Replace dialog. To call it, there are “hot keys” Ctrl + H and the “Replace” item in the drop-down list of the “Find and select” button - it is located in the “editing” command group on the “Main” tab.

5. In the Find field of the Find and Replace dialog, put a full stop and a comma in the Replace with field. If using this operation only on the current sheet of the document is enough, click the "Replace All" button and Excel will start executing the command. To replace on all sheets of an open document, press the "Options" button, set the value "in the book" in the drop-down list next to the "Search" inscription, and only later click on the "Replace all" button.

You can see the formula placed in a cell of a Microsoft Office Excel spreadsheet if you enable edit mode. It is also displayed in the formula bar of an open sheet. However, sometimes it is necessary to look at the algorithm for calculating values ​​not in a separate 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.

You will need

  • Tabular editor Microsoft Office Excel 2007 or 2010.

Instructions

1. Start the spreadsheet editor, load the document into it, formulas which you are worried about, and open the required sheet in it.

2. Go to the Formulas tab in the menu Microsoft Excel... The button you need is located in the "Formula Dependencies" command group, but no inscription is displayed on it, and it is not so primitive to identify the purpose from the picture. Be guided by the inscription "Influencing cells" - the necessary icon is located to the right, and when you hover over it with the mouse pointer, a tooltip with the title "Show formulas»And a short explanation of the purpose. Click on this button, and Excel will replace the values ​​with formulas in those cells where these formulas are available. This will change the formatting of all columns - they will become much wider.

3. In order to return the table to its original view, click on the same icon a second time. It is allowed to try instead of the buttons for turning on and off the mode of displaying formulas, use a combination of the service key Ctrl and a key with a tilde ~ (in the Russian layout - the letter Ё). Microsoft's reference material states that such a combination should work, but this is not invariably the case.

4. If you need not a one-time activation, but continuous display of formulas instead of values ​​in the current sheet or in each document, change the corresponding setting in the spreadsheet editor settings. To do this, first select the "Options" item (Excel 2010) in the main application menu, or click the "Excel Options" button (Excel 2007).

5. In the column listing the sections, select the line "Additional", and then scroll the long list of settings to half. Slightly below the middle there is a segment named "Show options for further sheet". Select the required sheet or each document in the drop-down list next to this inscription, and then check the box "Show formulas, not their meanings. " Click OK and formulas appear in the cells of the spreadsheet.

The values ​​displayed in the cells of Microsoft Office Excel spreadsheets are often derived from the formulas written in them. The result of calculations can be zero value, which is undesirable to show in the cell. Zeros do not improve the overall readability of the results, especially if formulas display text rather than numeric values ​​in other cells of the column. There are several ways to solve this problem.

You will need

  • Tabular editor Microsoft Office Excel 2007 or 2010.

Instructions

  • To disable the display of zero values ​​in all cells of an open sheet of an Excel document, use one of the settings in the general settings of the spreadsheet editor. These settings are opened through the main menu - in the 2010 version, click on the "File" button to access it, and in the 2007 version, the round Office button is intended for this. Click on the menu item "Options" (version 2010) or click the button "Excel Options" (version 2007).
  • Select the "Advanced" section from the list and scroll through the list of settings to "Show options for next sheet." Uncheck the box next to Show zeros in cells that contain zero values, and click OK.
  • Another method allows you to hide zero values ​​not in the entire sheet, but in an arbitrarily selected group of cells. Highlight desired area tables and click the selection with the right mouse button. In the pop-up menu, select the "Format cells" line, and in the left column of the window that opens, click on the bottom line - "All formats".
  • In the field under the "Type" label, enter the following sequence of characters: "0; -0 ;; @" (without quotes). If non-zero values ​​of the selection are to be displayed with a certain number of decimal places, after each zero in this entry, add the corresponding number of zeros, separating them with a comma. For example, to set the precision to hundredths, this record should look like this: "0.00; -0.00 ;; @". Then click OK and the zeros will no longer be displayed.
  • The third method does not remove zero values, but paints them in the background color of the cell and thus makes them invisible. This method uses conditional formatting - select the required column or set of columns and click on the button with this name in the "Styles" group of commands. In the drop-down list, go to the "Cell selection rules" section and select the "Equal" line.
  • In the left field of the form that appears, enter zero, and in the list of the right field, select "Custom Format". The "Format Cells" dialog will open, on the "Font" tab of which you need a drop-down list below the "Color" inscription - open it and in the color table select the shade of the cell background (usually white). Click the OK buttons in both open dialogs and the task will be completed.
  • You can customize the display of null values ​​in a cell or use a set of formatting standards in the table that require you to hide null values. You can show and hide null values ​​in different ways.

    Hide and show all zero values ​​in a worksheet

      Please select File > Options > Additionally.

      In a group

      • Show zeros in cells that contain null values.

    Hide zero values ​​in selected cells

    These actions hide the null values ​​in the selected cells with numeric format... Hidden values ​​are displayed only in the formula bar and are not printed. If the value in one of these cells changes to nonzero, it will be displayed in the cell, and the value format will be similar to the general number format.

    Show hidden values.

      Select cells with hidden null values.

      You can press the keys CTRL + 1 or in the tab home click Format> Format Cells.

      To apply the default number format, select Number> Total and press the button OK.

    Hiding null values ​​returned by a formula

      In the tab home Conditional formatting and choose Cell Highlighting Rules> Equals.

      In the left box, enter 0 .

      In the right box, select Custom format.

      In field Cell format open the tab Font.

      In the list Colour select white and click OK.

    Display zeros as spaces or dashes

    To solve this problem, use the IF function.

    If a cell contains null values, use a formula such as this to return an empty cell:

    IF (A2-A3 = 0; ""; A2-A3)

    Here's how to read the formula. If the calculation result (A2-A3) is "0", nothing is displayed, including "0" (this is indicated double quotes""). Otherwise, the result of the calculation A2-A3 is displayed. If you need not to leave cells blank, but display something other than "0", insert a hyphen "-" or another character between the double quotes.

      Select the PivotTable report.

      In the tab Analysis in a group Pivot table Options and select the item Options.

      Go to the tab Layout and format

      • Change the display of errors In field Format check the box For errors display

        Change the display of empty cells Check the box For empty cells, display

    The need to display zero values ​​(0) on sheets does not always arise. Whether formatting standards or your own preference require displaying or hiding null values, there are several ways to implement all of these requirements.

      Please select File > Options > Additionally.

      In a group Show options for next sheet select a sheet, and then do one of the following:

      • To display zero (0) values ​​in cells, select the checkbox Show zeros in cells that contain null values.

        To display null values ​​as blank cells, uncheck Show zeros in cells that contain null values.

      You can press the keys CTRL + 1 or in the tab home click Format> Format Cells.

      In field Type of enter 0;-0;;@

    Notes:

      Hidden values ​​appear only in the formula bar or in the cell if you are editing its contents. These values ​​are not printed.

      To display the hidden values ​​again, select the cells, and then press the keys CTRL + 1 or in the tab home in a group Cells hover over the element Format and select Cell format... To apply the default number format, in the list Category choose General... To display the date and time again, select the appropriate date and time format on the tab Number.

      Select the cell containing the zero (0) value.

      In the tab home in a group Styles click the arrow next to the item Conditional formatting, hover over element Cell selection rules and choose an option Equals.

      In the left box, enter 0 .

      In the right box, select Custom format.

      In the dialog box Cell format open the tab Font.

      In field Colour choose white.

    To accomplish this task, use the function IF.

    Example

    IF function.

    Hiding Zero Values ​​in a PivotTable Report

      In the tab Options in a group Pivot table options click the arrow next to the command Options and select the item Options.

      Go to the tab Layout and format, and then follow these steps.

      In field Format check the box For errors display... Enter the value you want to display instead of errors in the field. To display errors as blank cells, remove all text from the field.

      Check the box For empty cells, display... Enter the value you want to display in the blank cells in the box. To keep them blank, remove all text from the field. To display null values, clear this check box.

    The need to display zero values ​​(0) on sheets does not always arise. Whether formatting standards or your own preference require displaying or hiding null values, there are several ways to implement all of these requirements.

    Show and hide all null values ​​in a worksheet

    Hide zero values ​​in selected cells using number format

    These actions allow you to hide the zero values ​​in the selected cells. If the value in one of the cells becomes nonzero, its format will be similar to the general number format.

      Select the cells containing the zero values ​​(0) that you want to hide.

      You can press the keys CTRL + 1 or in the tab home in a group Cells click Format> Format Cells.

      In field Type of enter 0;-0;;@

    Notes:

    Hiding null values ​​returned by a formula using conditional formatting

      Select the cell containing the zero (0) value.

      In the tab home in a group Styles click the arrow next to the button Conditional formatting and choose Cell Highlighting Rules> Equals.

      In the left box, enter 0 .

      In the right box, select Custom format.

      In the dialog box Cell format open the tab Font.

      In field Colour choose white.

    Using a formula to display zeros as spaces or dashes

    Use the IF function to accomplish this task.

    Example

    To make this example easier to understand, copy it to blank sheet.

    Copying an example

      Highlight the example provided in this article.

    Important: Do not highlight row or column headings.

    Highlighting an example in help

      Click on CTRL keys+ C.

      In Excel, create a blank workbook or sheet.

      Select cell A1 on the sheet and press CTRL + V.

    Important: For the example to work correctly, it needs to be inserted into cell A1.

      To switch between viewing the results and viewing formulas that return those results, press CTRL + `(accented) or on the tab Formulas in the Formula Dependencies group, click Show formulas.

    By copying the example onto a blank sheet, you can customize it the way you want.

    For more information on using this function, see the article IF Function.

    Hiding Zero Values ​​in a PivotTable Report

      Click the PivotTable report.

      In the tab Options in a group Pivot table options click the arrow next to the command Options and select the item Options.

      Go to the tab Layout and format, and then follow these steps.

      Change the way errors are displayed. In field Format check the box For errors display... Enter the value you want to display instead of errors in the field. To display errors as blank cells, remove all text from the field.

      Change the way empty cells are displayed. Check the box For empty cells, display... Enter the value you want to display in the blank cells in the box. To keep them blank, remove all text from the field. To display null values, clear this check box.