Calculating OD from weight and/or metres in VBA

5 pts.
Tags:
VBA
VBA macro
Visual Basic
Hi there,

Have a problem trying to convert weight and/or metres to OD, I work in the flexible packaging industry coordinating all the trials for the UK & Europe.

I can calculate from an exsisting OD to weight & Metres using the following VBA statement;

RNEW = (PI * ((((NEWI(1) / 1000) / 2) ^ 2) - (((76 / 1000) / 2) ^ 2))) / (Val(Left(MAT, 2)) / 1000000)

Where PI is a constant created by PI = Application.WorksheetFunction.PI()

NEWI() is an array containing, recieved OD, recieved weight, recieved metres .. specifically for this calculation the recieved OD

76 is the internal diameter of the core the material is wound onto

MAT is the gauge of the material recieved.

This works fine, however when I minus the recieved amount from the stock amount and convert it back to OD using

OD = (2 * (Sqr((((TGAUGE / 1000000) * RNEW) / PI)))) * 1000 + ((CORE / 2) ^ 2) / 1000

TGAUGE = Material Gauge : RNEW = Metres : CORE = Core Diamter

there is a discrepencies between the actual measured OD and the calculated one.

Any Help would be appreciated, especially if somone knows the right calculation for this.

Regards

Software/Hardware used:
Windows XP (SP3) - Office Excel (11.8169.8172) SP3 - VBA 6.5
Related Questions