On Google Sheets, I am trying to create a formula within a single cell that calculates the positive or negative number of days between two dates. Specifically I am trying to determine how much buffer in days between two dates, positive or negative. I want it to automatically change to positive or negative correctly to determine how many days we have between the two dates OR how many days we don’t have (negative days). Having a hard time explaining lol.
For example:
Column A: 1/1/2022
Column B: 1/2/22
Column C (Days): 1
————
Column A: 12/1/2022
Column B: 11/2/22
Column C (Days: -30
For whatever reason I can wrap my head around this and keep getting errors when using if(date 1>date 2, datedif(date 1, date 2, “d”), -datedif(date1, date 2, “d)) for example which I thought would have thought worked :(.
Any ideas? I feel like there’s a very simple solution but I can’t quite crack it (coding is not my strong suit).
=B2-A2
? By the way, between 12/1/2022 and 11/2/22 29 days, not 30