How do I subtract days from a cell that has dates?
For example, what's a formula that will take 3/2/2011 and return this value 2/28/2011?
If you have one cell that is formatted as a date (e.g. 3/2/11
) and subtract 2 from it, you will get 2/28/11
:
For example your formula would be
A1-2
More generally, you can decompose a given date into YEAR(), MONTH(), and DAY() values, then recombine them via DATE(). For instance, to add six months and a day to A1
=DATE(YEAR(A1), MONTH(A1)+6, DAY(A1)+1 )