• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

formula to calculate dates in excel

ashish navale

New Member
Hi...I want a formula which will calculate dates which will be greater than one month in past...irrespective of any date..and also calculate date which is greater than six months in future irrespective of any date..


could you plz help me with a formula which will work...as I want this formula to include in a macro..
 
When you say any date greater than 1 month in the past you can simply go

=Today()-31

and for 6 months in the future

=Today()+183


If you want to check if a date is within 1 month of the past

=if(A1>Date(year(Today()),Month(Today())-1,day(Today())),True, False)


If you want to check if a date is within 6 month in the future

=if(A1>Date(year(Today()),Month(Today())+6,day(Today())),True, False)
 
Hi....I need some more help plz...actually the formula which u gave to calculate dates is not working as per my requirement. I mean to say formula '=today()-31' catches a date which should not be supposed to catch...like eg. if today is 30 July...and in report I see the date as 1 June...It should not catch this date. It should actually catch a date which will be of May month and previous. Formula should be able to catch month which is greater than one month in past and not calculate days. Now current month is July...so any date having june month is ok..but dates before June month should be catched...I would appreciate ur help in this matter..
 
Back
Top