我有一个包含3行值的表:
Row1 : 5
Row2 : 8
Row3 : 9
Run Code Online (Sandbox Code Playgroud)
我希望计算增加或减少的百分比:Row2与Row1,Row3相比Row2所以我会有这个表:计算%的公式是: [Row(n+1) - Row(n)] / Row(2)
Value Percentage
Row1 : 5 -
Row2 : 8 60% (increase compared to Row1) | (8-5)/5
Row3 : 9 12.5%(increase compared to Row2)| (9-8)/8
Run Code Online (Sandbox Code Playgroud)
请建议方式或解决方案.
谢谢大家.