Auto rearrange math formulas

donkeycrusher

New Member
Joined
Aug 13, 2004
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I've searched for about 4 hours now, so I finally have to break down and ask.

I'm creating an excel spreadsheet for physics (very fun) and thus far, doing it the hard way. For each equation, I've been using the =if(and(ifblank))) functions and rewriting my formulas for each scenario of blank or unknown cells. This has been a real PAIN IN THE REAR END!. Below is an example of what I have done (the hard way) with regard to right angles.

A1="Adjacent" B1="Opposite" C1="Hypotenuse" D1=Theta

A2=IF(AND(ISBLANK(A7),ISBLANK(B7)),COS(RADIANS(D7))*C7,IF(AND(ISBLANK(A7),ISBLANK(C7)),B7/TAN(RADIANS(D7)),IF(AND(ISBLANK(A7),ISBLANK(D7)),SQRT(C7^2-B7^2),"")))

B2=IF(AND(ISBLANK(B7),ISBLANK(D7)),SQRT(C7^2-A7^2),IF(AND(ISBLANK(B7),ISBLANK(A7)),SIN(RADIANS(D7))*C7,IF(AND(ISBLANK(B7),ISBLANK(C7)),TAN(RADIANS(D7))*A7,"")))

C2=IF(AND(ISBLANK(C7),ISBLANK(A7)),B7/SIN(RADIANS(D7)),IF(AND(ISBLANK(C7),ISBLANK(B7)),A7/COS(RADIANS(D7)),IF(AND(ISBLANK(C7),ISBLANK(D7)),SQRT(A7^2+B7^2),"")))

D2==IF(AND(ISBLANK(D7),ISBLANK(A7)),DEGREES(ASIN(B7/C7)),IF(AND(ISBLANK(D7),ISBLANK(B7)),DEGREES(ACOS(A7/C7)),IF(AND(ISBLANK(D7),ISBLANK(C7)),DEGREES(ATAN(B7/A7)),"")))


Now that I've tortured myself the hard way, I'm hoping someone can tell me how to simply write a formula that basically goes
=sqrt(A1^2 + B1^2 = C1^2)
Then automatically rearranges the equation so that if I have any combination of the two legs, it automatically solves for the other.

Thanks in advance for the help and reading this lenghthy post.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Does this do what you want ??

=IF(OR(A1=0,B1=0),SQRT(C1^2-B1^2-A1^2),SQRT(A1^2+B1^2))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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