Here is my macro
Sub c()
Dim iMax As Double, iMin As Double, lRowMax As Long
iMax = Application.WorksheetFunction.Max(Range("C2:C20000"))
lRowMax = Range("C2:C20000").Find(iMax).Row
iMin = Application.WorksheetFunction.Min(Range("C2" & ":C" & lRowMax - 1))
Dim rAX As Range
For Each rAX In Range("C2:C20000")
rAX.Offset(, 47) = rAX - iMin
Next
End Sub
I would like to change the highlighted part, so it only takes after the difference after the i min, for example the imin was in row 3, take the difference of row 4 and higher...
also is there anyway to mass produce it so that i can use the same code for each column (D, E, F... correlating to AX, AY, AZ etc)
Thanks.
Sub c()
Dim iMax As Double, iMin As Double, lRowMax As Long
iMax = Application.WorksheetFunction.Max(Range("C2:C20000"))
lRowMax = Range("C2:C20000").Find(iMax).Row
iMin = Application.WorksheetFunction.Min(Range("C2" & ":C" & lRowMax - 1))
Dim rAX As Range
For Each rAX In Range("C2:C20000")
rAX.Offset(, 47) = rAX - iMin
Next
End Sub
I would like to change the highlighted part, so it only takes after the difference after the i min, for example the imin was in row 3, take the difference of row 4 and higher...
also is there anyway to mass produce it so that i can use the same code for each column (D, E, F... correlating to AX, AY, AZ etc)
Thanks.