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
ASKED: November 30, 2009  10:41 AM
UPDATED: December 4, 2009  9:55 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

This is what I get from your original equation:

OD = 2000 * SQR((RNEW * (TGAUGE / 1000000))/PI + ((CORE / 2000) ^ 2))

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following