Order of Formula?

suertetres

New Member
Joined
Nov 8, 2023
Messages
14
Office Version
  1. 365
Platform
  1. Windows
This may be more of a math rule question and I'm absolutely stumped on how to write the formula. I'm trying Multiple a cell by 4 then subtract it from another cell. For example, A1 is 778 and A2 is 3122. I'm trying to multiply A1 by 4 and then subtract that from A2. 778x4-3122. My current formula is =A2-A1*4. The answer it gives me is 10, but it should be zero. Can someone help me correct my formula?
 

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.
You need to use a parentheses in order to get excel to calculate the multiplication first.

(A1*4) etc.
 
Upvote 0
You need to use a parentheses in order to get excel to calculate the multiplication first.

(A1*4) etc.
I tried this, my formula with the parenthesis was =a2-(a1*4) and it still returns the result of 10 instead of 0
 
Upvote 0
I tried this, my formula with the parenthesis was =a2-(a1*4) and it still returns the result of 10 instead of 0
Hmmm. This formula gives me an answer of 10

VBA Code:
=A2-(A1*4)

Why would it be 0 though? It should be 10. 778 * 4 = 3112. Cell A2 has 3122. 3122-3112 = 10.
 
Upvote 0
Hmmm. This formula gives me an answer of 10

VBA Code:
=A2-(A1*4)
Exactly, it should be zero though, 778x4 is 3112. I'm trying to multiple A1 by 4, so 778*4 then subtract that answer from A2 which is 3112. It should be zero but i keep getting 10.
 
Upvote 0
You have a typo.

10 IS the correct answer.
If A1 was 3112 and NOT 3122, it would be 0.
 
Upvote 0
Solution
You have a typo.

10 IS the correct answer.
If A1 was 3112 and NOT 3122, it would be 0.
WOW- thank you. I've been trying to figure this out far too long for it to be that simple. Thank you, and embarrassingly I'll exit stage left now :)
 
Upvote 0
LOL! No worries! It happens to all of us, at one point or another.
Sometimes you just got to step away from a problem for a while, or have a second set of eyes look at it!
 
Upvote 0
I cannot tell you how many times I have banged my head-up against the wall trying to solve a programming problem, and put it down for the day.
And then I look at it the next morning, and figure it out right away, and it is almost ALWAYS a typo.
I think after looking at a problem for too long, we start to see what we want instead of what is really there!
 
Upvote 0

Forum statistics

Threads
1,215,096
Messages
6,123,074
Members
449,093
Latest member
ripvw

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