basic calculation yields different result depending on method- help?!

BSWJON

Board Regular
Joined
Mar 24, 2014
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hi folks,

I am using pivot tables to create calculated fields.

The arithmetic is: data1+data2+data3*100000/hours worked

If doing the calculation as above it yields a different value to manually adding the data figs and entering a number, ie

2*100000/hours worked

Then if i do other variations of essentially the same numbers, I get other different values (see below)

Can anyone explain why the numbers are different and which I should be using?

Apologies if this is basic maths (got me thinking back to BODMAS but surely Excel should factor this in?) but believe it or not, maths is not my forte!

Thanks as always

Jon

BSW Group HSMS Report 1.4.xlsm
ABCDEFGH
1SiteDateFiscal YearTotal Hours WorkedDat 1Dat 2IgnoreDat 3
2A31/03/20222022355920000
3B31/03/20222022265250000
4C31/03/20222022338420000
5D31/03/2022202283250120
6E31/03/2022202255190000
7F31/03/20222022191720000
8G31/03/2022202236170001
9H31/03/202220223420000310
10166792011
11
12
13Option 11.20
14Option 21.60
15Option 32.0
16Option 40.60
Sheet13
Cell Formulas
RangeFormula
D10D10=SUBTOTAL(109,[Total Hours Worked])
E10E10=SUBTOTAL(109,[Dat 1])
F10F10=SUBTOTAL(109,[Dat 2])
H10H10=SUBTOTAL(109,[[Dat 3 ]])
E13E13=2*100000/Table18[[#Totals],[Total Hours Worked]]
E14E14=Table18[[#Totals],[Dat 1]]+Table18[[#Totals],[Dat 2]]+Table18[[#Totals],[Dat 3 ]]*100000/Table18[[#Totals],[Total Hours Worked]]
E15E15=1+1+0*100000/Table18[[#Totals],[Total Hours Worked]]
E16E16=0+0+1*100000/Table18[[#Totals],[Total Hours Worked]]
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
It is BODMAS (or whatever acronym you prefer).

1+1+1/2 is not at all the same as (1+1+1)/2
 
Upvote 0
Thanks Rory, yes upon further investigation, addition of brackets to the calculations eventually yields consistent results.

BSW Group HSMS Report 1.4.xlsm
DE
13Option 11.199
14Option 21.199
15Option 31.199
16Option 41.199
Sheet13
Cell Formulas
RangeFormula
E13E13=(2*100000)/Table18[[#Totals],[Total Hours Worked]]
E14E14=(Table18[[#Totals],[Dat 1]]+Table18[[#Totals],[Dat 2]]+Table18[[#Totals],[Dat 3 ]])*100000/Table18[[#Totals],[Total Hours Worked]]
E15E15=((1+1+0)*100000)/Table18[[#Totals],[Total Hours Worked]]
E16E16=((0+1+1)*100000)/Table18[[#Totals],[Total Hours Worked]]
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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