Hi fellow Excel Addict,
Thanks for joining me today for my 'Excel in Minutes' tip.
Please feel free to share it with your friends—chances are they will too.
If you missed my 'Excel in Seconds' newsletter from Tuesday, I showed how to 'Be Careful When Using Numeric Column Headings'. You can read the tip here.
Keep on Excelling,
Francis Hayes (The Excel Addict)
If you missed my last newsletter, you can click here to view it online.
If you have a favourite quote, send it to me and I may post it in my newsletter.
Check if a Date Falls Between Two Other Dates
If you need to check if a date in one cell falls between dates in two other cells, here's a formula you can use.
In this example, the date we want to check (our target date) is in cell C2. The MEDIAN function returns the middle value of all values we supply to it. So we supply it with the three values we want to evaluate: our target date plus the two values we want to compare it against.
In this example, since the date in cell C2 falls between the dates in cells A2 and B2, the result of =MEDIAN(A2,B2,C2) is 16-Oct-2016.
Next, the formula uses the IF function to check if the value in C2 (first reference) is equal to 16-Oct-2016 (i.e. the result of the MEDIAN function). Since it is and the result of the IF function is TRUE, the 'value if true' result is Yes.
Alternatively, you could omit the IF function and use this formula to return a TRUE or FALSE result.
|"Spreadsheets Tips From An
Excel Addict" is a weekly publication of TheExcelAddict.com.
Copyright Francis J. Hayes All Rights Reserved.
8 Lexington Place, Conception Bay South, Newfoundland, Canada, A1X 6A2 Phone: 709-834-4630