Professional Documents
Culture Documents
Beam Col Wall
Beam Col Wall
Sub Beam()
Attribute Beam.VB_Description = "Beam Design and calculates total quantity of re
inforcement from ETABS file"
Attribute Beam.VB_ProcData.VB_Invoke_Func = " \n14"
'
' Beam Macro for ETABS v9.5 & V9.6
' Beam Design and calculates total quantity of reinforcement from ETABS file
' Use Unit kN-m only
' Created By Atul Tegar atul.tegar@gmail.com
'
Range("A1").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Dim Str As Double
On Error Resume Next
Application.DisplayAlerts = False
Str = Application.InputBox(Prompt:="Enter Stirrup Length in meters", Tit
le:="Stirrup Length")
On Error GoTo 0
Application.DisplayAlerts = True
Selection.Subtotal GroupBy:=1, Function:=xlCount, TotalList:=Array(17), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=2, Function:=xlAverage, TotalList:=Array(4, 8, _
11, 13, 15), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Range("R1").Select
ActiveCell.FormulaR1C1 = "Top Rebar"
Range("S1").Select
ActiveCell.FormulaR1C1 = "Bottom Rebar"
Range("T1").Select
ActiveCell.FormulaR1C1 = "Shear Rebar"
Range("U1").Select
ActiveCell.FormulaR1C1 = "Torsion Rebar"
Range("R2").Select
ActiveCell.FormulaR1C1 = "=RC[-14]*RC[-10]*2"
Range("S2").Select
ActiveCell.FormulaR1C1 = "=RC[-15]*RC[-8]*2"
Range("T2").Select
ActiveCell.FormulaR1C1 = "=RC[-16]*RC[-7]*2*" & Str
Range("U2").Select
ActiveCell.FormulaR1C1 = "=RC[-17]*RC[-6]*2*" & Str
Dim y As Long
y = Range("B" & Rows.Count).End(xlUp).Row
Range("R2").AutoFill Destination:=Range("R2:R" & y), Type:=xlFillDefault
Range("S2").AutoFill Destination:=Range("S2:S" & y), Type:=xlFillDefault
Range("T2").AutoFill Destination:=Range("T2:T" & y), Type:=xlFillDefault
Range("U2").AutoFill Destination:=Range("U2:U" & y), Type:=xlFillDefault
Dim x, x1, x2, x3 As Long
x = y + 1
x1 = y + 2
x2 = y + 3
x3 = y + 4
Range("P" & x).Select
ActiveCell.FormulaR1C1 = "Steel in cu.m."
Range("P" & x1).Select
Sub Column()
'
' Column Macro for ETABS v9.5 & V9.6
' Column Design and calculates total quantity of reinforcement from ETABS file
' Use Unit kN-m only
' Created By Atul Tegar atul.tegar@gmail.com
'
Range("A1").Select
Dim z As Long
z = Range("A" & Rows.Count).End(xlUp).Row
Cells.Select
ActiveSheet.Sort.SortFields.Clear
ActiveSheet.Sort.SortFields.Add Key:=Range( _
ActiveWindow.FreezePanes = True
Dim WD, SH, CC, CC2, N2, R2 As Double
On Error Resume Next
Application.DisplayAlerts = False
WD = Application.InputBox(Prompt:="Enter Width of Wall in meters", Title
:="Shear Wall Width")
SH = Application.InputBox(Prompt:="Enter Average Storey Height in meters
", Title:="Storey Height")
CC = Application.InputBox(Prompt:="Enter clear cover of wall in meters",
Title:="Clear Cover")
On Error GoTo 0
CC2 = CC * 2
Application.DisplayAlerts = True
Range("R1").Select
ActiveCell.FormulaR1C1 = "Length"
Range("S1").Select
ActiveCell.FormulaR1C1 = "Main Rebar"
Range("T1").Select
ActiveCell.FormulaR1C1 = "Shear Rebar"
Range("U1").Select
ActiveCell.FormulaR1C1 = "Gross Area Left"
Range("V1").Select
ActiveCell.FormulaR1C1 = "Gross Area Right"
Range("W1").Select
ActiveCell.FormulaR1C1 = "As Left"
Range("X1").Select
ActiveCell.FormulaR1C1 = "As Right"
Range("R2").Select
ActiveCell.FormulaR1C1 = "=SQRT((RC[-6]-RC[-8])^2+(RC[-5]-RC[-7])^2)"
Range("S2").Select
ActiveCell.FormulaR1C1 = "=RC[-11]*RC[-1]"
Range("Y1").Select
ActiveCell.FormulaR1C1 = "Wall Width"
Range("Y2").Select
ActiveCell.FormulaR1C1 = WD
Range("Z1").Select
ActiveCell.FormulaR1C1 = "Clear Cover"
Range("Z2").Select
ActiveCell.FormulaR1C1 = CC2
Range("T2").Select
ActiveCell.FormulaR1C1 = "=RC[-6] * ((RC[-2] - RC[6])+(RC[5]-RC[6]))*2"
Range("U2").Select
ActiveCell.FormulaR1C1 = "=RC[-6]*" & WD
Range("V2").Select
ActiveCell.FormulaR1C1 = "=RC[-6]*" & WD
Range("W2").Select
ActiveCell.FormulaR1C1 = "=0.02*RC[-2]"
Range("X2").Select
ActiveCell.FormulaR1C1 = "=0.02*RC[-2]"
Range("Y2").AutoFill Destination:=Range("Y2:Y" & z), Type:=xlFillDefault
Range("Z2").AutoFill Destination:=Range("Z2:Z" & z), Type:=xlFillDefault
Range("R2").AutoFill Destination:=Range("R2:R" & z), Type:=xlFillDefault
Range("S2").AutoFill Destination:=Range("S2:S" & z), Type:=xlFillDefault
Range("T2").AutoFill Destination:=Range("T2:T" & z), Type:=xlFillDefault
Range("U2").AutoFill Destination:=Range("U2:U" & z), Type:=xlFillDefault
Range("V2").AutoFill Destination:=Range("V2:V" & z), Type:=xlFillDefault
Range("W2").AutoFill Destination:=Range("W2:W" & z), Type:=xlFillDefault
Range("X2").AutoFill Destination:=Range("X2:X" & z), Type:=xlFillDefault
Range("S" & z1).Select
ActiveCell.FormulaR1C1 = Application.Sum(Range("S2:S" & z))