Pythagorean Theorem

ISY

Active Member
Joined
Nov 16, 2009
Messages
430
Office Version
  1. 365
Platform
  1. Windows
Hello

How do you write the following formula in VBA?

PHP:
=RADQ(A3^2+B3^2)
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
One way:

Code:
myVariable = Evaluate("sqrt(A3^2 + B3^2)")
 
Upvote 0
Assuming A3 and B3 are cell references, then give this a try...
Code:
Hypotenuse = Sqr(Range("A3").Value * Range("A3").Value + Range("B3").Value * Range("B3").Value)
 
Upvote 0
ISY:
What is RADQ?

shg: Why not use VBA functions?


Code:
MsgBox Sqr(Range("A3") ^ 2 + Range("B3") ^ 2)
 
Upvote 0
Hello

Thank you all,
I could not convert the Italian formula in VBA do I use the hundreds at each cycle here is the reason why the first test I had done with the formulas.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,671
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top