
You won’t find this one in the function wizard so you will have to remember how to type it in yourself. The best way is to use the DATEDIF() function. If you want to know the number of months or years between two dates, things get trickier.

But all you have to do is set the formatting for that cell to General or to any number format (right-click > choose Formatting) to make the result show as 29. Excel may automatically format the cell with the formula in it as a date, which means instead of seeing 29, you’ll see.

For example if cell A2 has an invoice date in it of and cell B2 has a date paid of, then you could enter use the formula =B2-A2 to get the number of days between the two dates, or 29. If need to know the number of days between two dates, that is very easy to do in Excel.
