Excel/Formula help - date within 30 days
I am doing a check to see if data is correct. I have a spreadsheet which shows 2 dates, these should be within 30 days of each other. I want a formula that will check this and show a "t" (true) or "f" (false) to stop me from having to manually look at thousands of dates!
Hope you can help.
P.s I am using Excel 2010
I will assume the earliest date is in A1 and the lastest date is in B1 and the formula will be in C1.
A1: First Date (assume this is the earliest date)
B1: Second Date (assume this is the latest date)
If you have more date pairings going down columns A and B, then you can select C1 and drag fill it down column C.
Dates are stored as the number of days from a specific base date. So if you subtract the earliest date from the lastest date, then you will get the difference as the number of days apart.
Now just as if I subtract 1 from 10, the answer is 9, So it will be for the two dates. You will have to assess your standard and see how you define the 30 limitation. If it includes counting both dates with the 30 day limitation, then you would need to change <= to <
As written the formula could also be expressed as
This might be a clearer expression of your rule.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here