How can I use the IF function in Excel to return either net income or net loss?

The IF function in Excel allows users to create logical statements that can return different values based on specified conditions. This function can be used to determine whether a company has a net income or net loss by setting up a logical statement that compares the revenue and expenses. If the revenue is greater than the expenses, the function will return the net income. If the expenses are greater than the revenue, the function will return the net loss. By using the IF function in Excel, users can easily and accurately determine the financial status of a company.

Excel: Use IF Function to Return Net Income or Net Loss


You can use the following formula to use an IF function to return “net income” or “net loss” based on the value of specific cells in Excel:

=IF(B2>C2,"Net Income",IF(B2<C2,"Net Loss", "Even"))

Assuming total revenue is in cell B2 and total expenses is in cell C2, this IF function returns the following values:

  • If revenue is greater than expenses, then return “Net Income”
  • If revenue is less than expenses, then return “Net Loss”
  • Otherwise, if revenue is equal to expenses, then return “Even”

The following example shows how to use this formula in practice.

Example: Use IF Function to Return Net Income or Net Loss in Excel

Suppose we have the following dataset in Excel that shows the total revenue and expenses of various retail stores in different locations:

Suppose we would like to create a formula to return either “Net Income”, “Net Loss”, or “Even” to indicate how the revenue compared to the expenses in each region.

We can type the following formula into cell D2 to do so:

=IF(B2>C2,"Net Income",IF(B2<C2,"Net Loss", "Even"))

We can then click and drag this formula down to each remaining cell in column D:

Excel IF function to return net income or net loss

Column D now displays “Net Income”, “Net Loss” or “Even” to indicate how the revenue compared to the expenses in each region.

For example:

  • Revenue was less than expenses in the North region, so the formula returned “Net Loss”
  • Revenue was greater than expenses in the East region, so the formula returned “Net Income”
  • Revenue was greater than expenses in the South region, so the formula returned “Net Income”

And so on.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

x