I am using the following formula in a Google Sheets to calculate the number of days between two dates (dates are in columns G and AL):
=ARRAYFORMULA(if(row(A:A)=1, "Readmission Days", (G:G)-(AL:AL)))
It has to be an array because I am working with a Google Forms and entries are automatically populated into new rows.
The problem is that some of the cells in col AL are blank, so the formula is reading those dates as something else and returning a very large number. Also, when both cells are blank, the formula returns a
0, messing up my data.
How can I include something to ignore blank cells or just return a blank when one or both cell references is blank?