Associate
- Joined
- 30 Jan 2007
- Posts
- 931
- Location
- West Sussex
I am trying to automate a volume calculation in a spreadsheet and am struggling to spot the error in my equation.
The equation has two sets of inputs depending on whether it is a rectangle or a polygon but some inputs are shared. Below is an example of a 5x5x1 volume with a working space allowance around the perimeter and them the excavation depth
Rectangle Calc:
=((5+((500/1000)*2))*(5+((500/1000)*2)))*((1+(25.61-24.81))+100/1000)
= 68.40m3
Polygon Calc:
=(25+((20*1*(500/1000)))+(4*(500/1000)*500/1000))*((1+(25.61-24.81))+100/1000)
=68.40m3
But when combined it throws out a slightly different answer:
=(((5+((500/1000)*2))*(5+((500/1000)*2)))+(25+((20*(500/1000)))+(4*(500/1000)*500/1000)))*((1+(25.61-24.81))+100/1000)
=70.30m3
This 1.90m3 difference appears to be related to the depth calculation but I cant understand why it adding this to the total.
The equation has two sets of inputs depending on whether it is a rectangle or a polygon but some inputs are shared. Below is an example of a 5x5x1 volume with a working space allowance around the perimeter and them the excavation depth
Rectangle Calc:
=((5+((500/1000)*2))*(5+((500/1000)*2)))*((1+(25.61-24.81))+100/1000)
= 68.40m3
Polygon Calc:
=(25+((20*1*(500/1000)))+(4*(500/1000)*500/1000))*((1+(25.61-24.81))+100/1000)
=68.40m3
But when combined it throws out a slightly different answer:
=(((5+((500/1000)*2))*(5+((500/1000)*2)))+(25+((20*(500/1000)))+(4*(500/1000)*500/1000)))*((1+(25.61-24.81))+100/1000)
=70.30m3
This 1.90m3 difference appears to be related to the depth calculation but I cant understand why it adding this to the total.