Hello
I have a table with the patient's birthdate and admit date and want to calculate their date at time of admission.
I can get it if the patient's year of birth is in the same year as the admission:
=IF(YEAR(U2)=YEAR(F2),MONTH(F2)-MONTH(U2))/12
I can also get it if the year is not the same:
=IF(YEAR(U5)<>YEAR(F5),(YEAR(U5)-YEAR(F5))+(MONTH(U5)-MONTH(F5))/12)
But for some reason I am having difficulty combining the two IF statements to one so that I only have to do the calc for one column.
Any and all help greatly appreciated.
Shelby
I have a table with the patient's birthdate and admit date and want to calculate their date at time of admission.
I can get it if the patient's year of birth is in the same year as the admission:
=IF(YEAR(U2)=YEAR(F2),MONTH(F2)-MONTH(U2))/12
I can also get it if the year is not the same:
=IF(YEAR(U5)<>YEAR(F5),(YEAR(U5)-YEAR(F5))+(MONTH(U5)-MONTH(F5))/12)
But for some reason I am having difficulty combining the two IF statements to one so that I only have to do the calc for one column.
Any and all help greatly appreciated.
Shelby