prometheus
04-26-2016, 05:30 AM
Hi
i have this code
Cells(21 + i, 39).Value = -(10 ^ (Abs(Cells(21 + i, 37) / 3 - 1)))
which is incorrectly calculating this excel function : -(10^(ABS(AK2)/3)-1)
i think i should use Application.WorksheetFunction.Power but i cant get it to work....
nota:
i was able to use change the forumla to worksheet function : Cells(10 + i, 41).Value = -Application.WorksheetFunction.Power(Abs(Cells(10 + i, 37) / 3), 10) - 1
or the other one Cells(10 + i, 41).Value = -(10 ^ (Abs(Cells(10 + i, 37)) / 3) - 1)
Both formula's "work" , ie dont give an error but both calculate the wrong number
example: value 0.0629 in excel with this formula (=(10^(ABS(AK16)/3)-1) ) returns value = 0.0495
if i run the VBA formulas i get : 9.528
i have this code
Cells(21 + i, 39).Value = -(10 ^ (Abs(Cells(21 + i, 37) / 3 - 1)))
which is incorrectly calculating this excel function : -(10^(ABS(AK2)/3)-1)
i think i should use Application.WorksheetFunction.Power but i cant get it to work....
nota:
i was able to use change the forumla to worksheet function : Cells(10 + i, 41).Value = -Application.WorksheetFunction.Power(Abs(Cells(10 + i, 37) / 3), 10) - 1
or the other one Cells(10 + i, 41).Value = -(10 ^ (Abs(Cells(10 + i, 37)) / 3) - 1)
Both formula's "work" , ie dont give an error but both calculate the wrong number
example: value 0.0629 in excel with this formula (=(10^(ABS(AK16)/3)-1) ) returns value = 0.0495
if i run the VBA formulas i get : 9.528