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 ...
HansVogelaar
May 04, 2023MVP
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_100May 04, 2023Copper ContributorThank you Hans - Very much appreciate the help,
Mike