I have my head spinning and getting lost in nested if then else statements......you guys have always straightened it out....
I have attached a sample spreadsheet with data and the yellow colored cells are where the formulas would go, with a sample of the expected results.
I need to calculate the length of stay (LOS) of each client (each row) over a course of a number of years, based on the First Carelog Date and the Last Carelog Date, but I need to know total LOS per year
so for LOS FY13 I'm looking at (I think): If B1 >= 1/1/13 and C1 <= 12/31/13 then c1-b1 ELSE if b1 < 1/1/13 and c1<=12/31/13 then c1-1/1/13 = so the answer is either a number greater than 1 and less than 365 or the number is 365 or blank
I need to calculate this across for each year.
In the example: Row 2 for LOS Fy13 e2 is 310 because it is less than 365 days, but for F2-j2 the answer is nothing because the end date was in 2013
but in Row 3 e3 and f3 is 365 because they were with us for the full year of those years, but g3 is 9 because they left us on 1/9/15 (and we do need to count the day that is listed in c1)
Similarly, if the date in column b began in 2015, then e and f would be empty...
Clear as mud?
I have tried to figure out the easiest way to do this for weeks, after I figured out that I wasn't getting the right results the way we'd been doing it for years :| The raw data that I get out of my software doesn't make this easy.
Thank you for suggestions.
Bookmarks