11/6/2020
How to do basic subtraction
If you're new to Excel, you might be typing a formula for subtraction incorrectly. Here are two ways to do it:
Subtract a cell reference from another

Type two values in two separate cells. In a third cell, subtract one cell reference from the other. In this example, cell D2 has the budgeted amount, and cell E2 has the actual amount. F2 has the formula =D2-E2.

Type a positive value in one cell, and a negative value in another. In a third cell, use the SUM function to add the two cells together. In this example, cell D6 has the budgeted amount, and cell E6 has the actual amount as a negative number. F6 has the formula =SUM(D6,E6).
Repeat this process for other cells that have the error.

Type two dates in two separate cells. In a third cell, subtract one cell reference from the other. In this example, cell D10 has the start date, and cell E10 has the End date. F10 has the formula =E10-D10.
Or, use the DATEDIF function

Type two dates in two separate cells. In a third cell, use the DATEDIF function to find the difference in dates. For more information on the DATEDIF function, see Calculate the difference between two dates.
Check for leading spaces

If your cell has this problem, proceed to the next step. If you don't see one or more spaces, go to the next section on checking your computer's date settings.
Check your computer's date settings
Excel uses your computer's date system. If a cell's date isn't entered using the same date system, then Excel won't recognize it as a true date.
For example, let's say that your computer displays dates as mm/dd/yyyy. If you typed a date like that in a cell, Excel would recognize it as a date and you'd be able to use it in a subtraction formula. However, if you typed a date like dd/mm/yy, then Excel wouldn't recognize that as a date. Instead, it would treat it as text.
There are two solutions to this problem: You could change the date system that your computer uses to match the date system you want to type in Excel. Or, in Excel you could create a new column and use the DATE function to create a true date based on the date stored as text. Here's how to do that assuming your computers date system is mm/dd/yyy and your text date is 31/12/2017 in cell A1:
+ 1 on the Mac).Note: The formula above is written with the DATE, RIGHT, MID, and LEFT functions. Please notice that it is written with an assumption that the text date has two characters for days, two characters for months, and four characters for year. You may need to customize the formula to suit your date.
Source: Support.microsoft.com
12/11/2025