简体   繁体   中英

Formula to calculate time frames

I created a worksheet where there are two dates:

  1. AppDate
  2. ActionDate

I need to calculate a new ActionDate that is 30 days after the earlier of the AppDate or ActionDate that is input.

For example, I have an AppDate of 10/30/13 and an ActionDate of 11/1/13. I need to calculate off of the 10/30/13 date to create the new action date (25 days out) and the 30 days from date.

The first app and action dates may be the same or may be different.

Is there a way to do this?

如果两个日期都在单元格A1B1 ,请使用以下公式- =MIN(A1,B1)+30

As Tim has pointed out, the MIN(number1,number2,...) function in excel works perfectly fine on dates in order to determine the earlier date. Also, here's some more info on adding days .

So you can use something like this:

=MIN(A2:B2)+30

Which should like this:

演示

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM