?
Solved

Excel 2010 Date Difference Formula

Posted on 2011-02-11
4
Medium Priority
?
756 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 1600 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 200 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 200 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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

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

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

809 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