Need help with dates

Clau_

New Member
Joined
Sep 28, 2015
Messages
2
Hello guys,

I'm completely new to this forum so, hello everyone! :cool:

I'm a beginning user with Excel, and I really could use some help.
I would like to know the following because I just can't figure it out, even after spending some time on the web.

I currently have a cell with a "Start date" (C3) and I got a cell containing the date of today (A50) which is hidden. I also got a cell containing the expired date (E3) that contains the following formula: =DATEDIF(C3;A50;"M"). Now my question is, is it also possible to give up a end date, so that the expired date stops counting (E3). So for example I want to give cell D3 a end date, if the end date passes todays date cell E3 has to stop counting.

I hope my explanation is clear enough to understand what I mean.

Thanks in advance.

PS: I've added a screenshot to make it a bit easier to show you what I mean.
iKyuj
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try

=IF(A50 > E3;"";DATEDIF(C3;A50;"M"))

Though I'm not real clear on what you meant by if E3 passes today's date.
Does that mean if E3 is in the PAST, or FUTURE based on Today's date?
This formula is written as if E3 is in the PAST, then stop the counter.
If you meant the opposite, just change the > to <
 
Upvote 0
something like
=IF(F15>G15,"",DATEDIF(C3,A50,"M"))

so you test if you real lockout date is past, as its the first true that is processed
 
Upvote 0
=DATEDIF(C3;A50;"M")
does not give a date value (Integer of the number of Months from start-date C3 to end date A50).
So I don't see how your are comparing a date to this "End Date" which is not a date?
 
Upvote 0
Sorry for any inconvience,
Thanks everyone for the quick reply's.

E3 shows the difference between the start date and today's date =TODAY(). Today's date is October and the start date was July so the difference is 2 months for example.
I want to give D3 a end date and when that date passes today's date =TODAY() I want E3 to stop counting the difference.

Thanks.
 
Upvote 0
But as Spiller pointed out, E3 is NOT a date, it's just a number. The count of Months between start and Today.
So E3 is NOT an Expired Date, it's really just saying How many months have passed since Start.
You would need to set a rule that an event is Expired if it goes xx months, say 2 months.
THEN you could do
=IF(DATEDIF(C3;A50;"M")>2,"Expired",DATEDIF(C3;A50;"M"))
 
Upvote 0
If I've read your references correct...
=IF(TODAY() < D3 , DATEDIF(C3,TODAY(),"M"),DATEDIF(C3,D3,"M"))
 
Upvote 0
If I've read your references correct...
=IF(TODAY() < D3 , DATEDIF(C3,TODAY(),"M"),DATEDIF(C3,D3,"M"))
Assuming you are correct in how you read them, here is another way to write your formula...

=DATEDIF(C3,MIN(D3,TODAY()),"M")
 
Upvote 0
doh ! I still don't take advantage of MIN/MAX as often as I should :LOL:
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,392
Members
449,445
Latest member
JJFabEngineering

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top