excel formula to subtract number of days from a date

前端 未结 5 1585
醉话见心
醉话见心 2021-02-13 19:16

is there a way in Excel to have a formula that does something like this:

= 12/20/2010 - 180

which would take a certain date (12/20/2010 in this case) and subtrac

5条回答
  •  不知归路
    2021-02-13 19:54

    Say the 1st date is in A1 cell & the 2nd date is in B1 cell

    Make sure that the cell type of both A1 & B1 is DATE.
    Then simply put the following formula in C1:

    =A1-B1
    

    The result of this formula may look funny to you. Then Change the Cell type of C1 to GENERAL.

    It will give you the difference in Days.

    You can also use this formula to get the remaining days of year or change the formula as you need:

    =365-(A1-B1)
    

提交回复
热议问题