Calculation just doesnt add up

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,199
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I am trying to write a small basic code for fuel allowance of 45p per mile.

Currently i use this which works fine & correct.
Code:
=E18*0.45

But i now wish to add the cell value at E34
So i have written,
Code:
=E18+E34*0.45

The value comes back as £256 but it should be £134.65

222 x 0.45P = £99.90
77 x 0.45P = £34.65
...................................
299 x 0.45p = £134.55

How did i write it incorrect,please advise thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You need to put brackets around the addition.
Multiplication is done first followed by addition.
 
Upvote 0
In mathematics, the order of precedence perform multiplication BEFORE addition.
So to do what you want, use parentheses, i.e.
Code:
=(E18+E34)*0.45
 
Last edited:
Upvote 0
I knew that but been a long day BODMAS

Thanks
 
Last edited:
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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