Math Equation Help

bpgolferguy

Active Member
Joined
Mar 1, 2009
Messages
469
Hi, I currently have this equation in a line of code that returns a value into cell AY4 based on a value entered into AY4 to begin with:

.Value = .Value / Range("K4").Value / 100 * Range("K3").Value

The way I WANT the equation to calculate is like this:

.Value = (the value I enter into AY4) divided by the number returned from this.....K4 divided by 100 then multiplied by K3.

I know I'm probably missing some parenthesis somewhere, or maybe some brackets, but what's happening is it isn't calculating that second part by itself, then dividing it by the number I originally enter in AY4. Any suggestions? Thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try

Code:
.Value = .Value / (Range("K4").Value / 100) * Range("K3").Value
 
Upvote 0
If I read your logic right, you want the parenthesis arranged like this

.Value = .Value / ((Range("K4").Value / 100) * Range("K3").Value)

So it first does
Range("K4").Value / 100
The result of that is multiplied by K3
The result of that is devided into .Value


Is that right?
 
Upvote 0
If I read your logic right, you want the parenthesis arranged like this

.Value = .Value / ((Range("K4").Value / 100) * Range("K3").Value)

So it first does
Range("K4").Value / 100
The result of that is multiplied by K3
The result of that is devided into .Value


Is that right?

That was it exactly....and it worked perfectly....thank you!
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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