How can I make VBA run through equations to solve for unknown values

Same_Sabtos

New Member
Joined
Oct 15, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have this project that I am working on and wondered if there was a way to make it easier/simpler. As for what I am trying to do, I am trying to have a set of values that essentially solve each other. Each value has multiple equations available to solve them and these values are used to solve for the other values using those equations. I want to make it so that I can input only 3 of any of those values to solve for the others. Any ideas on how to proceed with this problem?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
1665880161052.png
general idea but i dont think code-wise this works
 
Upvote 0
Hi. Maybe somebody can give you help,
if you upload to the forum examples.
wich formula goes first and so on.
let me just assume I am able to help you
this forum expect something like:
Book1
ABCD
1V
2TOTAL600
3AIR300
4SOLID200
5WATER100
6VOID50
7
8AIR 300
9
10
Sheet1


so after this little miny tiny illustration then is possible to maybe help.
like:
VBA Code:
Sub DiffEq()
air = Range("C3").Value
Solid = Range("C4").Value
water = Range("C5").Value
Total = Range("C2").Value

 Range("C8") = Total - Solid - water
 
End Sub
beautiful flow chart
 
Upvote 0

Forum statistics

Threads
1,215,470
Messages
6,124,992
Members
449,201
Latest member
Lunzwe73

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