Pythagorean theorem as a macro in Excel?

I have a small school project and should create a macro for the Pythagorean theorem called: (a²+b²)^(1/2) = c

The whole thing currently looks like this:

So far it only calculates the square root of value1 + value2, but it is supposed to calculate the square root of the squares of value1 + value2.

I have tried several things, like:

(value1² + value2²) ^(1/2)

(value1^2 + value2^2)^(1/2)

((value1)^2 + (value2)^2)^(1/2)

But nothing worked.

I would be very happy to receive an answer.

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
2 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Schachpapa
1 year ago

How about worth1 * worth1, that’s all right

Is there a function sqrt (square root = root)?

Don’t you have to write the blessing somewhere or return it?

Nepumuk7
1 year ago

Hello,

So:

Result = Sqr (value 1 ^ 2 + value 2 ^ 2)

Note the blanks around the ^!!!