Forum Discussion
Mike_Allred_100
May 04, 2023Copper Contributor
Math functions in Excel
Need help with the following formula: =(B8-G8)*A8-I8/2
Cell B8 = 38
Cell G8 = 1
Cell A8 = 4
Cell I8 = 4
Result I get is 144, correct result should be 72 - does not divide by 2
I read this formula as 38 minus 1 = 37 times 4 = 148 minus 4 = 144 divided by 2.
Thank you.
No, division has priority over subtraction, so Excel computes I8/2 = 2 and subtracts that from 148, resulting in 146 (not 144).
If you want to divide 144 by 2, write the formula as
=((B8-G8)*A8-I8)/2
The parentheses force Excel to perform the subtraction first, then the division.
- Mike_Allred_100Copper ContributorThank you Hans - Very much appreciate the help,
Mike