Compare Dates To Maximum Date

  • Hello,
    I have a problem of finding this formula,:confused:
    I eloborate my question to 3 parts:-

    1. I want to compare between Date1 and Date2 which one is the latest,
    2. Lets say Date2 is the latest,then i want to compare it with Date3 wether
    the length between Date2 & Date3 was 5 days.
    3. If the length less or equal to 5days, it will write '1' to colum A
    and if more than 5days ,it will write '1' to colum B

    17/10/2006----10/10/2006---22/10/2006----- -------1

    can anybody help me..please


  • Re: Comparing Length Of Dates & Put The Value To Other Colum

    hi sinac,

    welcome to

    place this in col A:

    and this in col B:

    pls take note that the formulas doesn't take into account if date1 and/or date2 is bigger than date3

    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and[/st]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!