Hey all,
I need help with a formula.
I have two columns of dates, beginning date and end date. I need a separate cell that will search all the end dates and compare them to the next beginning date and calculate the number of days between the two. If the number of days is 35 or greater I need that cell to populate with that number. If the number is under 35 I need the cell to be blank.
Then, if the number is 35 or greater, I need two other cells to populate with the day after the end date and the day before the next beginning date.
For some context - I have one sheet that lists classes that a student is taking and another that shows breaks in attendance. What I would like the second sheet to do is auto-populate from the first if the student takes any breaks 35 days or greater. The sheet should show the beginning of the break (the day after the last day of attendance) and the end (the day before the next class starts) as well as the number of days off.
Is this even remotely possible?
Let me know if you need some clarification.
Thanks!
How about this in C2 to compare the dates in A2 (begin) and B2 (end):
=IF(B2-A2<36, "", B2-A2)
...then copy that cell downward. If Excel gets weird, be sure to format the column as General.
Last edited by JBeaucaire; 09-07-2010 at 05:50 PM. Reason: Fixed....thanks Charlie
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
JB, I think you meant:
=IF(B2-A2<36, "", B2-A2)
hth
CC
If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks