Excel formula help

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.
 
wkMrTeW.jpg
 
If I put those calculations into excel I get:
68.4
68.4
136.8

Apart from the fact you appear to be missing a "1*" in the second part of your combined question "(25+((20*1*(500/1000)))+(4*(500/1000)*500/1000)))" (which is obviously academic given it doesn't change the result in this instance, but might play into your problems if that 1 relates to the depth of the volume calculation) it appears to work as expected no?
 
I get the same results as Roy in Excel with those formula so looks as though it works as you intend it to.
 
Remember that excel uses radians automatically

Just noticed no circle equation - will take a look and see what’s going on

Edit: getting the same as others
 
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.

EDIT : My mistake. No extra bracket.
 
Last edited:
Back
Top Bottom