ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculating length of time with conditions (https://www.excelbanter.com/excel-worksheet-functions/251227-calculating-length-time-conditions.html)

markg

Calculating length of time with conditions
 
I would like to calculate the length of time a client spends in a program.
We use three columns (entry date, exit date, today's date). If a client is
still enrolled I would like to base the length of time on today's date. If
the client leaves the program, I would like to base the length of time on the
exit date. Preference is to display the length of time in months. Thank you.

Fred Smith[_4_]

Calculating length of time with conditions
 
You want Datedif, as in:
=Datedif(entry date, if(exit date = "",today(),exit date),"m")

Regards,
Fred

"markg" wrote in message
...
I would like to calculate the length of time a client spends in a program.
We use three columns (entry date, exit date, today's date). If a client
is
still enrolled I would like to base the length of time on today's date.
If
the client leaves the program, I would like to base the length of time on
the
exit date. Preference is to display the length of time in months. Thank
you.




All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com