Skip to content

Instantly share code, notes, and snippets.

@yuyueugene84
Created August 10, 2020 03:28
Show Gist options
  • Save yuyueugene84/c8d1a286427b6d3da800ae0589cbe75b to your computer and use it in GitHub Desktop.
Save yuyueugene84/c8d1a286427b6d3da800ae0589cbe75b to your computer and use it in GitHub Desktop.
Sub CalculateReturnValue()
Dim i As Integer
Dim j As Integer
For j = 3 To 7 Step 2
For i = 3 To 24
Cells(i, j).Value = (Cells(i, j - 1).Value - Cells(i - 1, j - 1).Value) / Cells(i - 1, j - 1).Value
Next i
Next j
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment