Hi
I am using Excel 2002 and I'm trying to calculate wait times for patients per month.
Col_1 is referral date, Col_2 is assessment date, Col_3 is Apr 2009, Col_4 is May 2009, Col_5 is Jun 2009 and so on.
There will be 3 scenarios to consider for calculation:
if col_1 and col_2 are blank then leave columns_3 etc will be zero
if col_1 has a date and col_2 is blank then assume col_2 is the end of the month so if the calculation is in col_3 (Apr)then the calculation will be col_1 minus Apr 30, 2009 and col_2 will be col_1 minus May 31, 2009 etc.
if col_1 and col_2 have valid dates then difference of then calculation is required for the two dates per each month column. For instance if col_1 is Apr 4 and col_2 is Apr 10 then col_3 (Apr) will be 6 days and zero in all other columns. If col_1 is Apr 4 and col_2 is May 10 then col_3 (Apr) will be 26 days and col_4 (May) will be 10 days and all other months will be zero days.
Currently I have:
=IF(AND($C2="",$B2=""),0,MAX(0,MIN(J$1,$C2)-MAX(I$1,$B2)))
but it's not letting me include the third scenario. How can I get this to work? Thanks for any and all assistance.
I am using Excel 2002 and I'm trying to calculate wait times for patients per month.
Col_1 is referral date, Col_2 is assessment date, Col_3 is Apr 2009, Col_4 is May 2009, Col_5 is Jun 2009 and so on.
There will be 3 scenarios to consider for calculation:
if col_1 and col_2 are blank then leave columns_3 etc will be zero
if col_1 has a date and col_2 is blank then assume col_2 is the end of the month so if the calculation is in col_3 (Apr)then the calculation will be col_1 minus Apr 30, 2009 and col_2 will be col_1 minus May 31, 2009 etc.
if col_1 and col_2 have valid dates then difference of then calculation is required for the two dates per each month column. For instance if col_1 is Apr 4 and col_2 is Apr 10 then col_3 (Apr) will be 6 days and zero in all other columns. If col_1 is Apr 4 and col_2 is May 10 then col_3 (Apr) will be 26 days and col_4 (May) will be 10 days and all other months will be zero days.
Currently I have:
=IF(AND($C2="",$B2=""),0,MAX(0,MIN(J$1,$C2)-MAX(I$1,$B2)))
but it's not letting me include the third scenario. How can I get this to work? Thanks for any and all assistance.