Value(in degrees) +/- 90° (With restrictions)

gfdwer2

New Member
Joined
Jan 22, 2020
Messages
28
Office Version
  1. 2016
  2. 2010
Platform
  1. MacOS
Hello guys need help for a formula. Any help would be appreciated.

Example:
X + 90° = Y
if Y exceed 360°, then subtract 360° from it.

X - 90° = Z
if Z results to a negative number then add 360° to it

NOTE:
Y - Z = 180 (Absolute Value)

Result should be:
Cell A1 = Y or Z (depends which has the smaller value)
Cell B1 = Y or Z (depends which has the bigger value)
 
Last edited:
Hello,

You are looking for the MOD function.

Excel Formula:
Y = MOD(X + 90, 360)

Y = MOD(X - 90, 360)

So

Excel Formula:
A1 =MIN(MOD(X + 90, 360), MOD(X - 90, 360))

B1 =MIN(MOD(X + 90, 360), MOD(X - 90, 360))
 
Upvote 0
Solution
Hello,

You are looking for the MOD function.

Excel Formula:
Y = MOD(X + 90, 360)

Y = MOD(X - 90, 360)

So

Excel Formula:
A1 =MIN(MOD(X + 90, 360), MOD(X - 90, 360))

B1 =MIN(MOD(X + 90, 360), MOD(X - 90, 360))
THANKS A LOT SIR

Excel Formula:
A1 =MIN(MOD(X + 90, 360), MOD(X - 90, 360))

B1 =MAX(MOD(X + 90, 360), MOD(X - 90, 360))
 
Upvote 0
gfdwer2,

Please Note: In the future, when marking a post as the solution, please mark the post that originally contains the solution (not your own post acknowledging that some other post was the solution).
When a post is marked as the solution, it is then shown right underneath the original question so people viewing the question can easily see the question and solution in a single quick glance without having to hunt through all the posts.

I have updated this thread for you.
 
Upvote 0

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