Dates: length of time and averages

On a spreadsheet I have one column where I enter the date I bought a property. Another column where I sold the property. A third column that shows the length of time in between where I held the property. Right now, as I have it, if there is not a sold date an error message shows up in the Time Held column. It would be nice to be rid of that. If there is neither a date bought nor date sold entered yet it registers a 0 in the time held column and it would be nice to be rid of that. Just to keep things clean but not essential. How can I do that?


Finally in the footer of the time held column I would like it to show what is the average time held among all the rows. How do I do that?


MacBook Pro 13", macOS 10.14

Posted on May 8, 2019 9:56 PM

Reply

Similar questions

2 replies

May 8, 2019 11:38 PM in response to Brian Entz

One way is to do something like this:




The formula in N2, filled down:


=IF(OR(ISBLANK(I2),ISBLANK(M2)),"",M2−I2)


This tells Numbers to insert a blank (null string) if either the cell in column I or the cell in column M is blank (or if both are blank), otherwise subtract the value in I from the value in M.


The formula in the Footer Row could be simply, =AVERAGE(N)


SG


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Dates: length of time and averages

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.