Solved

Excel 2010 Date Difference Formula

Posted on 2011-02-11
4
746 Views
Last Modified: 2012-05-11
Does anyone know how to do the following:

Cell 1      Cell 2      Cell3
-------      ------       -----
Date1       Date2     Result

The macro needs to do following:  Take the difference between Date1 and Date2, where Date2 is farther out.  The Result is true if the difference in dates in number of days is less than a specific number (say, 90).
0
Comment
Question by:lcor
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 400 total points
ID: 34873398
You don't need a macro. Put this formula in cell 3

=IF(B1-A1<90,"True","False")

Sid
0
 
LVL 9

Expert Comment

by:AriMc
ID: 34873400
Let's say Cell1 is A1, Cell2 is B1 and Cell3 is C1

Then, in C1 you'd write:

=(B1-A1)>90

0
 
LVL 9

Assisted Solution

by:AriMc
AriMc earned 50 total points
ID: 34873415
Oops, got the comparison wrong, should be

=(B1-A1)<90
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 50 total points
ID: 34873432
Do you need a macro?

If dates are in A2 and B2 try a formula in C2

=B2-A2<90

regards, barry
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
My experience with Windows 10 over a one year period and suggestions for smooth operation
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now