How to not calculate (ignore formula) if the cell is zero in excel

Zeros are interesting figures they could be in a recorded data with the knowledge of the user or without them such a case and one wants to revoke a command that if there is the presence of zeros the formula shouldn't calculate what does one do? This is important because people could change data to zero which could affect other people.

In this case, is the IF command vital? For example in a case whereby the total amount of salary in a firm is being calculated. If there is a presence of a zero in the data then the total should not be calculated this is because there is a zero in the data. In such a case the person calculating can check who or where the zero is placed and correct it then calculates the total.

In instances where the zeros are not accounted then the total displayed might lack the salaries of a few of the employers because some of them might have zeros recorded in the cells. This would be a mere act of carelessness which was avoidable. The following are steps in assigning the IF command in cases where there zero is present in a cell and should not be calculated if present;

Step 1

Record a data set with zero values in a new excel sheet like in the case below.

Step 2

In the above data set, we have one of the cells with a zero value but we still need to calculate the ages. To achieve this, we will use the formula; =IF (B2<>"", (TODAY ()-B2)/365.25,""). The formula uses the IF statement to get the ages from the dates of birth to the date today using the TODAY function as well. Change the Cell value to any cell you want to calculate for example B3, B4, and any other cell. Ignore cell B5 to avoid getting incorrect details of the age because the value in the cell is 0.

Leave a Comment