Excel 2010 Date Difference Formula

Posted on 2011-02-11
Medium Priority
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).
Question by:lcor
  • 2
LVL 30

Accepted Solution

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



Expert Comment

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

Then, in C1 you'd write:



Assisted Solution

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

LVL 50

Assisted Solution

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

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


regards, barry

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
What to do if a split doesn't fit? Or a bunch of invoice lines must be rounded while the sum must match a total? It takes a little, but - when done - it is extremely easy to implement.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

587 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