Simple IF/OR statement doesn't detect cells

randomasdf97

New Member
Joined
Apr 23, 2015
Messages
2
The cells B7, C7, D7 denote the sides of a triangle. The following code should tell me whether the triangle is right or not.

In "B7^2+C7^2=D7^2, B7^2+" it detects the cells B7, C7, D7, but after that none of the cells in "+D7^2=C7^2, C7^2+D7^2=B7^2" is detected and the B7, C7, D7 there look simply black (as opposed to colored, which they should be if they're detected).

Could it perhaps be due to the length of the code?

I get an error after putting this code in a cell and clicking Enter.

=IF(OR(B7^2+C7^2=D7^2, B7^2+D7^2=C7^2, C7^2+D7^2=B7^2); "Right triangle";"Not a right triangle").
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
The error in entering the formula is likely due to the use of 2 different list seperators.
You have some commas, and some semicolons..
They should all be the same..Either all commas or all semicolons.
depending on your regional settings.
 

randomasdf97

New Member
Joined
Apr 23, 2015
Messages
2
The error in entering the formula is likely due to the use of 2 different list seperators.
You have some commas, and some semicolons..
They should all be the same..Either all commas or all semicolons.
depending on your regional settings.
This solved my problem. Thanks!
 

Forum statistics

Threads
1,085,842
Messages
5,386,292
Members
401,992
Latest member
CleverHopper

Some videos you may like

This Week's Hot Topics

Top