excel formula to subtract number of days from a date

前端 未结 5 1584
醉话见心
醉话见心 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:43

    Here is what worked for me (Excel 14.0 - aka MS Office Pro Plus 2010):

    =DATE(YEAR(A1), MONTH(A1), DAY(A1) - 16)
    

    This takes the date (format mm/dd/yyyy) in cell A1 and subtracts 16 days with output in format of mm/dd/yyyy.

提交回复
热议问题