0

I have to create a dataset with intervals (month and year).

Does it exist a formula that give me the same day but 1 month/year before?

I know I can use

=today()-30

or

=today()-365

but not all month are by 30 days (and the same for years).

I know I can use =day() to extract the day then compose it with the =month()-1 and so on

1 Answer 1

4

For month you can use EDATE function:
=EDATE(TODAY,-1)

For years you need to use more complex functions:
=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))

1
  • These formulas work. The tricky part with the month is making sure that Mar 31 - 1 month = Feb 29. EDATE() handles that, no problem. Aug 17, 2016 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .