How to calculate the percentual difference of speeds between 2 consecutive runs or 2 consecutive hikes, in the Numbers.app?
Hello,
I have a Numbers 13.2 file on my M1 MacBook Air, running Sonoma, in which I have a 15-year data of my runs and hikes.
Firstly, I had 13 years and 4 months of only runs; it was followed by 1 year 8 months of only hikes and starting in September I have both, i.e., runs and hikes.
Among others, the spreadsheet has these columns, that function as 'fields' of a database:
i) in column C, the activity: Run or Hike;
ii) in column D, the 'distance';
iii) in column H, the 'duration';
iv) there are columns that automatically calculate the 'speed' -- 'Column I', in "m/s" & 'Column k', in "km/h" -- and the 'pace', 'Column N', in "min/km"; these calculations only appear "if" the 'date/time' -- ascending order -- is written;
v) I have several other columns with 'summaries' and another 'sheet' with extra 'summaries'.
vi) The 'Column M', '∆v', is a calculated 'field', that shows the % increase (in black) or % decrease (in red), between the "last speed" of 'Column K' and the "former speed" of 'Column K': "=IF(ISBLANK('Date/Time'),"",K2033÷K2032−1)".
This formula served me well until the the spreadsheet completed its 15 anniversary on Sep 7, because I was comparing the speed variation between runs or between hikes.
But now, that I could have a hike followed by a run, it makes no sense to know the ∆v between different activities.
The problem to be solved:
Every time that I write the data of an activity in 'Column C' -- "Run" or "Hike" -- I need a formula, or an AppleScript script, to insert in the 'Column M', '∆v', that automatically calculate the '∆v' between the speed of the present cell of 'Column k' with the speed of former cell of 'Column k" that has the same activity.
Any light is welcome,
Jorge Lucas (the guy from Rio Grande do Sul)
MacBook Air (M1, 2020)