# Simple IF/OR statement doesn't detect cells

#### randomasdf97

##### New Member
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
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.

#### randomasdf97

##### New Member
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.
This solved my problem. Thanks!

You're welcome.