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").
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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.
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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