Created
May 20, 2014 02:45
-
-
Save francisluong/3c6d3c959a0357a8483d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ewan_description_3() | |
Columns("B:G").Select | |
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove | |
Rows("1:1").Select | |
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove | |
Range("A1").Select | |
ActiveCell.FormulaR1C1 = "mx" | |
Range("B1").Select | |
ActiveCell.FormulaR1C1 = "local" | |
Range("C1").Select | |
ActiveCell.FormulaR1C1 = "interface" | |
Range("D1").Select | |
ActiveCell.FormulaR1C1 = "description" | |
Range("E1").Select | |
ActiveCell.FormulaR1C1 = "cnd" | |
Range("E1").Select | |
ActiveCell.FormulaR1C1 = "cnt" | |
Range("F1").Select | |
ActiveCell.FormulaR1C1 = "uni" | |
Range("G1").Select | |
ActiveCell.FormulaR1C1 = "match" | |
Range("H1").Select | |
ActiveCell.FormulaR1C1 = "input" | |
Range("B2").Select | |
ActiveCell.FormulaR1C1 = _ | |
"=MID(RC[6],LEN(""set interface "")+1,FIND("" "",RC[6],LEN(""set interface "")+1)-LEN(""set interface ""))" | |
Range("C2").Select | |
ActiveCell.FormulaR1C1 = _ | |
"=IF(ISERROR(FIND(""previous"",RC[5])),IF(RC[1]="""","""",MID(RC[5],LEN(""set interface "")+1,FIND("" description"",RC[5])-LEN(""set interface ""))),""previous"")" | |
Range("D2").Select | |
ActiveCell.FormulaR1C1 = _ | |
"=SUBSTITUTE(IF(AND(ISERROR(FIND(""description "",RC[4])),ISERROR(FIND(""previous"",RC[4]))),"""",RIGHT(RC[4],LEN(RC[4])-FIND("""""""",RC[4]))),"""""""","""")" | |
Range("E2").Select | |
ActiveCell.FormulaR1C1 = _ | |
"=IF(RC[-4]&RC[-3]=R[1]C[-4]&R[1]C[-3],"""",COUNTIFS(R1C[-4]:R8000C[-4],RC[-4],R1C[-3]:R8000C[-3],RC[-3],R1C[-2]:R8000C[-2],""previous""))" | |
Range("F2").Select | |
ActiveCell.FormulaR1C1 = "=IF(RC[-5]&RC[-4]=R[1]C[-5]&R[1]C[-4],"""",1)" | |
Range("G2").Select | |
ActiveCell.FormulaR1C1 = _ | |
"=IF(AND(RC[-3]<>"""",R[1]C[-3]<>""""),IF(RC[-3]=R[1]C[-3],"""",""N""),IF(AND(RC[-3]<>"""",R[-1]C[-3]<>""""),IF(RC[-3]=R[-1]C[-3],"""",""N""),""""))" | |
Range("B2:G2").Select | |
With Selection.Font | |
.Name = "Lucida Bright" | |
.Strikethrough = False | |
.Superscript = False | |
.Subscript = False | |
.OutlineFont = False | |
.Shadow = False | |
.Underline = xlUnderlineStyleNone | |
.TintAndShade = 0 | |
.ThemeFont = xlThemeFontNone | |
End With | |
With Selection.Font | |
.Name = "Lucida Console" | |
.Strikethrough = False | |
.Superscript = False | |
.Subscript = False | |
.OutlineFont = False | |
.Shadow = False | |
.Underline = xlUnderlineStyleNone | |
.TintAndShade = 0 | |
.ThemeFont = xlThemeFontNone | |
End With | |
With Selection.Font | |
.Name = "Lucida Console" | |
.Size = 9 | |
.Strikethrough = False | |
.Superscript = False | |
.Subscript = False | |
.OutlineFont = False | |
.Shadow = False | |
.Underline = xlUnderlineStyleNone | |
.TintAndShade = 0 | |
.ThemeFont = xlThemeFontNone | |
End With | |
Columns("H:H").EntireColumn.AutoFit | |
Columns("G:G").EntireColumn.AutoFit | |
Columns("F:F").EntireColumn.AutoFit | |
Columns("E:E").EntireColumn.AutoFit | |
Columns("D:D").EntireColumn.AutoFit | |
Columns("C:C").EntireColumn.AutoFit | |
Columns("B:B").EntireColumn.AutoFit | |
Columns("A:A").EntireColumn.AutoFit | |
Range("A2").Select | |
Range("B2:G2").Select | |
Selection.AutoFill Destination:=Range("B2:G7863") | |
Range("B2:G7863").Select | |
Columns("B:B").EntireColumn.AutoFit | |
Columns("C:C").EntireColumn.AutoFit | |
Columns("D:D").EntireColumn.AutoFit | |
Cells.Select | |
With Selection.Font | |
.Name = "Lucida Console" | |
.Strikethrough = False | |
.Superscript = False | |
.Subscript = False | |
.OutlineFont = False | |
.Shadow = False | |
.Underline = xlUnderlineStyleNone | |
.ThemeColor = xlThemeColorLight1 | |
.TintAndShade = 0 | |
.ThemeFont = xlThemeFontNone | |
End With | |
With Selection.Font | |
.Name = "Lucida Console" | |
.Size = 9 | |
.Strikethrough = False | |
.Superscript = False | |
.Subscript = False | |
.OutlineFont = False | |
.Shadow = False | |
.Underline = xlUnderlineStyleNone | |
.ThemeColor = xlThemeColorLight1 | |
.TintAndShade = 0 | |
.ThemeFont = xlThemeFontNone | |
End With | |
Columns("D:D").Select | |
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove | |
Range("D1").Select | |
ActiveCell.FormulaR1C1 = "problem" | |
Range("I3").Select | |
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$I$7863"), , xlYes).Name = _ | |
"Table1" | |
Range("Table1[#All]").Select | |
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleLight11" | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment