That's fantastic. Thanks. I now have one final favour to ask before I
can get the program to do what I set out to do;
At the moment the user enters their data into cell A1 and the output is
written to cell B1 . How would I alter the code so that the user could
paste in n rows of input data (A1 to A'n') and n rows of output data
are written to the B column (B1 to B'n'). n would vary from case to
case and the user would never know what the size of n would be. i.e.
the VBA would have to cope with n being an unknown number.
Option Explicit
Dim BackFillConstant As Single
Dim FlowStress As Single
Dim Charpy As Single
Dim FractureArea As Single
Dim Pressure As Single
Dim ArrestPressure As Single
Private Sub Worksheet_Change(ByVal Target As Range)
With Worksheets("Pipeline Data")
BackFillConstant = .Range("K").Value
FlowStress = .Range("FlowStress").Value
Charpy = .Range("CV").Value
FractureArea = .Range("A").Value
ArrestPressure = .Range("ArrestPressure").Value
End With
Pressure = Worksheets("Fracture Velocity").Range("A1").Value
If Target.Address = "$A$1" Then
If IsNumeric(Target) Then
Range("B1") = fnFractureVelocity(BackFillConstant,
FlowStress, Charpy, FractureArea, Pressure, ArrestPressure)
End If
End If
End Sub
Once again, many thanks.
--
Aaron1978
------------------------------------------------------------------------
Aaron1978's Profile:
http://www.excelforum.com/member.php...o&userid=31201
View this thread:
http://www.excelforum.com/showthread...hreadid=546244