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...
IlirU
Nov 10, 2026Iron Contributor
Hi Excellent,
In cell D2 apply below formula:
=BYROW(B2:C5, LAMBDA(a, TOROW(a, 1))) - A2:A5Change the range in the formula as needed.
The range A2:C5 should be formatted as mmmm d yyyy hh:mm:ss AM/PM
The range D2:D5 should be formatted as [h]:mm:ss
HTH
IlirU