Hi There,
I have a table with hospital admission date (column A), discharge date (column B), and a third column that calculates the duration of stay (column C).
Sometimes, people forget to enter data for either the admission date (column A), or the discharge date (column B), or both (columns A & B)!!!
I would like to create a function for column C that does the following:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD="align: center"]Column C[/TD]
[/TR]
[TR]
[TD]Admission Date[/TD]
[TD]Discharge Date[/TD]
[TD]Lenght of Stay[/TD]
[/TR]
[TR]
[TD]NO DATA[/TD]
[TD]DATA[/TD]
[TD]"No Admission Date"[/TD]
[/TR]
[TR]
[TD]DATA[/TD]
[TD]NO DATA[/TD]
[TD]"Ongoing"[/TD]
[/TR]
[TR]
[TD]NO DATA[/TD]
[TD]NO DATA[/TD]
[TD]"No Data for Admission or Discharge"[/TD]
[/TR]
[TR]
[TD]DATA[/TD]
[TD]DATA[/TD]
[TD]Calculates B-A (easy!!!)[/TD]
[/TR]
</tbody>[/TABLE]
Can such a function be done all for one cell?
Thank you!!!
Locolindo
I have a table with hospital admission date (column A), discharge date (column B), and a third column that calculates the duration of stay (column C).
Sometimes, people forget to enter data for either the admission date (column A), or the discharge date (column B), or both (columns A & B)!!!
I would like to create a function for column C that does the following:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Column A[/TD]
[TD="align: center"]Column B[/TD]
[TD="align: center"]Column C[/TD]
[/TR]
[TR]
[TD]Admission Date[/TD]
[TD]Discharge Date[/TD]
[TD]Lenght of Stay[/TD]
[/TR]
[TR]
[TD]NO DATA[/TD]
[TD]DATA[/TD]
[TD]"No Admission Date"[/TD]
[/TR]
[TR]
[TD]DATA[/TD]
[TD]NO DATA[/TD]
[TD]"Ongoing"[/TD]
[/TR]
[TR]
[TD]NO DATA[/TD]
[TD]NO DATA[/TD]
[TD]"No Data for Admission or Discharge"[/TD]
[/TR]
[TR]
[TD]DATA[/TD]
[TD]DATA[/TD]
[TD]Calculates B-A (easy!!!)[/TD]
[/TR]
</tbody>[/TABLE]
Can such a function be done all for one cell?
Thank you!!!
Locolindo