Consulting

Results 1 to 4 of 4

Thread: Solved: Help with formula please

  1. #1

    Solved: Help with formula please

    Hi,

    Is it possible to create a 'logical test' (or similar) formula to compare 2 cells with dates - the test is that if cell 2 date is more than 30 days in advance of cell 1 date then the result is YES (and if not NO).

    Any help appreciated

    thanks

    Jon

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =IF(A2>A1+30,"YES","NO")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Dates in Excel are really simple. Days are seen as a whole number, while times are decimal values. So as xld has shown above, to work out the number of days between any 2 dates it's simply Date1 minus Date2.

  4. #4
    Thanks for responses - didn't realise it was so simple.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •