Sub REACTIONS()
'
'
' Name current file
MyMacroFile = ActiveWorkbook.Name
LiveLoad = Range("LL")
DeadLoad = Range("DL")
Archload = 1
spans = Range("spancount")
begin1 = Range("begin_span1")
begin2 = Range("begin_span2")
begin3 = Range("begin_span3")
begin4 = Range("begin_span4")
begin5 = Range("begin_span5")
begin6 = Range("begin_span6")
begin7 = Range("begin_span7")
begin8 = Range("begin_span8")
begin9 = Range("begin_span9")
begin10 = Range("begin_span10")
end1 = Range("end_span1")
end2 = Range("end_span2")
end3 = Range("end_span3")
end4 = Range("end_span4")
end5 = Range("end_span5")
end6 = Range("end_span6")
end7 = Range("end_span7")
end8 = Range("end_span8")
end9 = Range("end_span9")
end10 = Range("end_span10")
filecount = Range("filecount") + 8
Application.ScreenUpdating = False
'save workbook before macro runs
ActiveWorkbook.Save
'clear all data from cells
Range("J9:M28000").ClearContents
mydir = Range("mydir")
mypath = mydir
For i = 9 To filecount
j = Cells(i, 9)
k = Cells(i, 8)
If j = 0 Then
Exit For
End If
MyFile = mypath & "\" & j
' Open .PRT file
Workbooks.OpenText Filename:=MyFile, Origin:=xlWindows, StartRow:=1, _
DataType:=xlFixedWidth, FieldInfo:=Array(0, 2)
' Name text file
MyTextFile = ActiveWorkbook.Name
Windows(MyTextFile).Activate
'GET THRUST VALUES
'FsInner
Cells.Find(What:="STRESSES IN CULVERT WALL (PSI) FOR LOAD INCREMENT" & Right(" " & LiveLoad, 6), After:=ActiveCell, LookIn _
:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
posbegin1 = Left(Right(ActiveCell.Offset(6 + k, 0), 55), 10)
'FsOuter
Cells.Find(What:="STRESSES IN CULVERT WALL (PSI) FOR LOAD INCREMENT" & Right(" " & LiveLoad, 6), After:=ActiveCell, LookIn _
:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
negbegin1 = Left(Right(ActiveCell.Offset(6 + k, 0), 40), 10)
'FsComp
Cells.Find(What:="STRESSES IN CULVERT WALL (PSI) FOR LOAD INCREMENT" & Right(" " & LiveLoad, 6), After:=ActiveCell, LookIn _
:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
compbegin1 = Left(Right(ActiveCell.Offset(6 + k, 0), 25), 10)
'Fv
Cells.Find(What:="STRESSES IN CULVERT WALL (PSI) FOR LOAD INCREMENT" & Right(" " & LiveLoad, 6), After:=ActiveCell, LookIn _
:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
shearbegin1 = Right(ActiveCell.Offset(6 + k, 0), 10)
Range("A1").Activate
ActiveWorkbook.Close
Application.ScreenUpdating = False
Windows(MyMacroFile).Activate
'span 1 values
Range("J" & i) = posbegin1
Range("K" & i) = negbegin1
Range("L" & i) = compbegin1
Range("M" & i) = shearbegin1
'COPY VALUES TO SUMMARY TABLE
Next i
End Sub