Solved

# Excel 2010 Date Difference Formula

Posted on 2011-02-11
751 Views
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
Question by:lcor
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 30

Accepted Solution

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

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

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

=(B1-A1)<90
0

LVL 50

Assisted Solution

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook Free & Paid Tools
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
###### Suggested Courses
Course of the Month7 days, 12 hours left to enroll