Variable range in vba function formula

Closed
Report
Posts
5
Registration date
Thursday October 27, 2016
Status
Member
Last seen
November 5, 2016
-
Posts
17641
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
November 25, 2021
-
Hello,
If i want to do this formula

((1/c1)^2+(1/c2)^2 .............................. + (1/c)^2 )^(-0.5)

for variable range by ( vba function) or excel formula

note:

i can use this way but i need to use variable range

Public Function Add(number1 As Double, number2 As Double)
Add = (1 / (number1) ^ 2 + 1 / (number2) ^ 2) ^ (-0.5)
End Function



1 reply

Posts
17641
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
November 25, 2021
5
How is the range determined?
Are the value present in adjacent cells in a sheet?
Are you prepared to add formulas into that sheet?
Posts
17641
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
November 25, 2021
5
Did you get the answer you expected?