excel formula to subtract number of days from a da

2019-03-25 04:10发布

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 subtract 180 days . .

5条回答
唯我独甜
2楼-- · 2019-03-25 04:33

Assuming the original date is in cell A1:

=A1-180

Works in at least Excel 2003 and 2010.

查看更多
何必那么认真
3楼-- · 2019-03-25 04:37

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.

查看更多
我只想做你的唯一
4楼-- · 2019-03-25 04:43

You can paste it like this:

= "2010-12-20" - 180

And don't forget to format the cell as a Date [CTRL]+[F1] / Number Tab

查看更多
走好不送
5楼-- · 2019-03-25 04:51

Assuming the original date is in cell A1:

=DATE(YEAR(A1), MONTH(A1), DAY(A1)-180)
查看更多
仙女界的扛把子
6楼-- · 2019-03-25 04:53

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)
查看更多
登录 后发表回答