# How to find difference in Excel sheets

Calculate the difference between two values in your Microsoft Excel worksheet. Excel provides one general formula that finds the difference between numbers, dates and times. It als

Calculate the difference between two values in your Microsoft Excel worksheet. Excel provides one general formula that finds the difference between numbers, dates and times. It also provides some advanced options to apply custom formats to your results. You can calculate the number of minutes between two time values or the number of weekdays between two dates.

## Operators

- Find the difference between two values using the subtraction operation. To subtract values of one field from another, both fields must contain the same data type. For example, if you have "8" in one column and subtract it from "four" in another column, Excel will not be able to perform the calculation. Ensure that both columns are equal data types by highlighting the columns and selecting a data type from the "Number" drop-down box on the "Home" tab of the Ribbon.

## Numbers

- Calculate the difference between two numbers by inputting a formula in a new, blank cell. If A1 and B1 are both numeric values, you can use the "=A1-B1" formula. Your cells don't have to be in the same order as your formula. For example, you can also use the "=B1-A1" formula to calculate a different value. Format your calculated cell by selecting a data type and a number of decimal places from the "Home" tab of the Ribbon.

## Times

- Find the difference between two times and use a custom format to display your result. Excel provides two options for calculating the difference between two times. If you use a simple subtraction operation such as "=C1-A1," select the custom format "h:mm" from the Format Cells options. If you use the TEXT() function such as "=TEXT(C1-A1,"h:mm")," define the custom format within the equation. The TEXT() function converts numbers to text using a custom format.

## Dates

- Excel provides two options for calculating the difference between two dates. You can use a simple subtraction operation such as "=B2-A2" to calculate the amount of days between those two calendar dates. You can also calculate the amount of week days between two calendar dates with the NETWORKDAYS() function. For example, if you input "=NETWORKDAYS(B2,A2)" in a new blank cell, your result will include only the days between Monday and Friday.