Forum Discussion
Excellent
Nov 09, 2026Copper Contributor
How to change the columns a formula will get its data from
Here is a dummy example of what my spreadsheet looks like, the end date/time can be in different columns based on external factors. a b c d 1 Start date/time Other date/time End date...
PeterBartholomew1
Nov 11, 2026Silver Contributor
This looks a little different but that is because I only use defined names for referencing and array formulas for calculation!
= LET(
finalDatetime, IF(ISBLANK(endDatetime), otherDatetime, endDatetime),
finalDatetime - startDatetime
)I could do without LET and the finalDatetime variable, but I prefer formulas broken down into small steps.