Mar 18 2021 05:11 PM
Is there a formula or function I can use to subtract one date from the previous date in the same column to get the number of days since the previous date?
I need to do this in a way that the formula doesn't crash when I delete a row in the middle, hence looking at structural references.
I also need to make sure that the formula doesn't get an error when calculating the difference for the very first date in the column since it would try to subtract the column header from the first date. The formula I have in column E takes care of the error catching, but not the deletion of rows.
Can someone help me with this?
Spreadsheet attached.
Thank you,
George
Mar 19 2021 12:37 AM - edited Mar 19 2021 12:38 AM
Solution@George_Weston My Excel didn't like your file and could not open it. So, I created an example in a blank file as shown in the picture. Should work similar in your situation.
Mar 19 2021 01:21 AM
That could be
=IF(ROW()=ROW(Table9[[#Headers],[Date]])+1, "",
[@Date]-INDEX([Date],ROW()-ROW(Table9[[#Headers],[Date]])-1))
Mar 19 2021 08:14 AM
Mar 19 2021 12:37 AM - edited Mar 19 2021 12:38 AM
Solution@George_Weston My Excel didn't like your file and could not open it. So, I created an example in a blank file as shown in the picture. Should work similar in your situation.