Have Excel formulas that return 0, make the result blank

前端 未结 14 2044
别那么骄傲
别那么骄傲 2020-12-31 09:45

A recurring Excel problem I have is formulas such as INDEX(array,row,column) that return 0 when there\'s no result, rather than returning blank.

What is

14条回答
  •  别那么骄傲
    2020-12-31 10:03

    I noticed this issue recently and it is frustrating that excel changes a blank string into a 0. I do not think that a formula should solve this issue because adding more logic to a complex formula may be cumbersome and might even end up breaking the original formula. I have two non formula options below.

    If you want to keep the formulas in the cells and have them return 0 instead of "" use the following Click Path:

    1. File
    2. Options
    3. Advanced

    Scroll to "Display options for this worksheet:"

    1. Deselect "Show a zero in cells that have zero value"

    I also want to give a simple manual solution if you want to change a value (as opposed to a formula) from 0 to a blank string. This solution is better than Find and Replace because it will not replace a number like 101 with 11.

    1. Select all of your data
    2. On the data tab, click the filter logo

    1. Click on the pick list of the column with the undesired 0(s) to select only rows with the value "0" (Make sure to only clear the contents of cells containing contents with the exact value 0!)

    1. Select the data (which is only 0s), right click and select clear contents

    The other data will remain if you used the filter properly and the back button is always there if something goes wrong. I understand option 2 is very manual and "unelegant" but it does successfully convert a 0 into a blank string and it may relieve a frustrated individual who does not want to use an if statement.

    I personally learned something exploring this (very dry) excel issue today and I am personally using these methods moving forward. A quick macro of option 2 could be a good option if this is a frequent task for an intermediate excel user.

提交回复
热议问题