You are on page 1of 6

Module1 - 1

Sub LTECCBF()
'Praise the Lord
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$9"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AB$78"
With ActiveSheet.PageSetup
.RightFooter = "L&T-ECC"
End With
End Sub
Function Pt(Mu As Double, B, d, ddash, fck, fy, DD)
Dim mubd2 As Double
Mulimit = Mu_limit(B, d, fck, fy)
If Mu < Mulimit Then
mubd2 = Mu * 10 ^ 6 / (B * d ^ 2)
Pt = 50 * (1 - Sqr(1 - 4.595 * mubd2 / fck)) / (fy / fck)
ptmin = 0
If DD = "Y" Then ptmin = 0
If Pt < ptmin Then Pt = ptmin
Else
Pt = pt_limit(B, d, fck, fy)
Mu2 = Mu - Mulimit
ast2 = Mu2 * 10 ^ 6 / (0.87 * fy * (d - ddash))
Pt = Pt + 100 * ast2 / (B * d)
End If
End Function
Function Mr(B, d, ddash, fck, fy, Astpro)
If fy = 250 Then M_co_eff = 0.149
If fy = 415 Then M_co_eff = 0.138
If fy = 500 Then M_co_eff = 0.133
Mulimit = M_co_eff * fck * B * d ^ 2 / 10 ^ 6
Ast1 = pt_limit(B, d, fck, fy) / 100 * B * d
ast2 = Astpro - Ast1
If ast2 < 0 Then
Mr = (0.87 * fy * Astpro * d * (1 - (Astpro * fy) / (B * d * fck))) / 10 ^ 6
Else
Mr = (ast2 * 0.87 * fy * (d - ddash)) / 10 ^ 6 + Mulimit
End If
End Function
Function Mu_limit(B, d, fck, fy)
If fy = 250 Then M_co_eff = 0.149
If fy = 415 Then M_co_eff = 0.138
If fy = 500 Then M_co_eff = 0.133
Mu_limit = M_co_eff * fck * B * d ^ 2 / 10 ^ 6
End Function
Function pt_limit(B, d, fck, fy)
pt_limit = 41.3793103448276 * fck / fy * xu_max_by_d(fy)
End Function
Function xu_max_by_d(fy)
If fy = 250 Then xu_max_by_d = 0.531
If fy = 415 Then xu_max_by_d = 0.479
If fy = 500 Then xu_max_by_d = 0.456
End Function
Function fsc(fy, d, esc, ddash)
If fy = 250 Then
xumax = xu_max_by_d(fy) * d
fsc = 700 * (1 - ddash / xumax)
End If
If fy = 415 Then
If esc > 0 And esc <= 0.00144 Then fsc = 288.7 - ((288.7 - 0) * (0.00144 - esc) / (0.00144
- 0))
If esc > 0.00144 And esc <= 0.00163 Then fsc = 306.7 - ((306.7 - 288.7) * (0.00163 - esc) /
(0.00163 - 0.00144))
If esc > 0.00163 And esc <= 0.00192 Then fsc = 324.8 - ((324.8 - 306.7) * (0.00192 - esc) /

Module1 - 2
(0.00192 - 0.00163))
If esc > 0.00192 And esc <= 0.00241 Then fsc = 342.8 - ((342.8 - 324.8) * (0.00241 - esc) /
(0.00241 - 0.00192))
If esc > 0.00241 And esc <= 0.00276 Then fsc = 351.8 - ((351.8 - 342.8) * (0.00276 - esc) /
(0.00276 - 0.00241))
If esc > 0.00276 And esc <= 0.0038 Then fsc = 360.9 - ((360.9 - 351.8) * (0.0038 - esc) / (
0.0038 - 0.00276))
End If
If fy = 500 Then
If esc > 0 And esc <= 0.00174 Then fsc = 347.8 - ((347.8 - 0) * (0.00174 - esc) / (0.00174
- 0))
If esc > 0.00174 And esc <= 0.00195 Then fsc = 369.6 - ((369.6 - 347.8) * (0.00195 - esc) /
(0.00195 - 0.00174))
If esc > 0.00195 And esc <= 0.00226 Then fsc = 391.3 - ((391.3 - 369.6) * (0.00226 - esc) /
(0.00226 - 0.00195))
If esc > 0.00226 And esc <= 0.00277 Then fsc = 413 - ((413 - 391.3) * (0.00277 - esc) / (0.
00277 - 0.00226))
If esc > 0.00277 And esc <= 0.00312 Then fsc = 423.9 - ((423.9 - 413) * (0.00312 - esc) / (
0.00312 - 0.00277))
If esc > 0.00312 And esc <= 0.00417 Then fsc = 434.8 - ((434.8 - 423.9) * (0.00417 - esc) /
(0.00417 - 0.00312))
End If
If fsc > 0.87 * fy Then fsc = 0.87 * fy
End Function
Function pc(Mu, B, d, ddash, fck, fy)
Mulimit = Mu_limit(B, d, fck, fy)
ddashbyd = ddash / d
esc = 0.0035 * (1 - ddashbyd / xu_max_by_d(fy))
If Mu < Mulimit Then
pc = 0
Else
Mu2 = Mu - Mulimit
ast2 = Mu2 * 10 ^ 6 / (0.87 * fy * (d - ddash))
fsc1 = fsc(fy, d, esc, ddash)
fcc = 0.446 * fck
pc = 100 * (0.87 * fy * ast2 / (fsc1 - fcc)) / (B * d)
End If
End Function
Function tauc(Pt As Double, B As Double, d As Double, fck As Double)
'function to guage the value of tc
Dim Beta As Double
Beta = 0.8 * fck / (6.89 * Pt)
If Beta < 1 Then Beta = 1
tauc = 0.85 * Sqr(0.8 * fck) * (Sqr(1 + 5 * Beta) - 1) / (6 * Beta)
If (Pt < 0.15) Then
If (fck = 15 Or fck = 20) Then
tauc = 0.28
ElseIf (fck = 25 Or fck = 30 Or fck = 35) Then
tauc = 0.29
Else
tauc = 0.3
End If
End If
End Function
Function EffCover(cc As Double, ds As Integer, n11 As Integer, d11 As Integer, n12 As Integer, d12
As Integer, n21 As Integer, d21 As Integer, n22 As Integer, d22 As Integer, n31 As Integer, d31 As
Integer, n32 As Integer, d32 As Integer)
'Function to find effective cover
EffCover = cc + ds + ((n11 * d11 ^ 2 + n12 * d12 ^ 2) * d11 / 2 + (n21 * d21 ^ 2 + n22 * d22 ^
2) * (2 * d11 + d21 / 2) + (n31 * d31 ^ 2 + n32 * d32 ^ 2) * (2 * d11 + 2 * d21 + d31 / 2)) / ((n11
* d11 ^ 2 + n12 * d12 ^ 2) + (n21 * d21 ^ 2 + n22 * d22 ^ 2) + (n31 * d31 ^ 2 + n32 * d32 ^ 2))
End Function

Module2 - 1
Sub SUMMARYSTEEL()
'
' SUMMARYSTEEL Macro
'
' Keyboard Shortcut: Ctrl+Shift+D
'
Range("G16").Select
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H16").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("G17").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H17").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("G18").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H18").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=9
Range("G19").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H19").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("G20").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H20").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("G21").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H21").Select
Selection.PasteSpecial Paste:=xlPasteValues,

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Module2 - 2
:=False, Transpose:=False
Range("G22").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H22").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("G23").Select
Application.CutCopyMode = False
Selection.Copy
Range("G13").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("H13").Select
Application.CutCopyMode = False
Selection.Copy
Range("H23").Select
Selection.PasteSpecial Paste:=xlPasteValues,
:=False, Transpose:=False
Range("L20").Select
Application.CutCopyMode = False
End Sub

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Operation:=xlNone, SkipBlanks _

Module5 - 1
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Range("A21:DE26").Select
Selection.Copy
Range("A27").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("A27").Select
End Sub
Sub Macro2()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+w
'
Range("A10:H34").Select
Selection.Copy
Range("A37").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("F38").Select
End Sub

Module6 - 1
Sub Macro3()
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("hide").Select
Rows("1:1").Select
Selection.Copy
Sheets("05. BEAM DESIGN").Select
Rows("8:8").Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("B16:B20").Select
Application.CutCopyMode = False
End Sub
Sub Macro4()
'
' Macro4 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Columns("B:DD").Select
Range("B14").Activate
Selection.EntireColumn.Hidden = False
Range("A16").Select
End Sub
Sub Macro5()
'
' Macro5 Macro
'
' Keyboard Shortcut: Ctrl+y
'
Rows("1:2").Select
Selection.Copy
Rows("6:6").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("B6").Select
Application.CutCopyMode = False
End Sub

You might also like