Sub SelectorAmazing()
'
' Decides whether it is a Transaction File or Holding File
'
' Keyboard Shortcut: Ctrl+Shift+D
'
If Left(A1, 1) = "H" Then
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1)), _
TrailingMinusNumbers:=True
Cells.Select
Cells.EntireColumn.AutoFit
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "Rec Type"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Port Code"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Sec Code"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Date"
Range("E1").Select
ActiveCell.FormulaR1C1 = "Curr"
Range("F1").Select
ActiveCell.FormulaR1C1 = "Nominal"
Range("G1").Select
ActiveCell.FormulaR1C1 = "Base MV"
Range("H1").Select
ActiveCell.FormulaR1C1 = "Base BV"
Range("I1").Select
ActiveCell.FormulaR1C1 = "Base Acc"
Range("J1").Select
ActiveCell.FormulaR1C1 = "Local MV"
Range("K1").Select
ActiveCell.FormulaR1C1 = "Local BV"
Range("L1").Select
ActiveCell.FormulaR1C1 = "Local Acc"
Range("A1:L1").Select
Selection.Font.Bold = True
Cells.Select
Cells.EntireColumn.AutoFit
ActiveWindow.Zoom = 85
Range("A1:L1").Select
Selection.AutoFilter
Rows("2:2").Select
ActiveWindow.FreezePanes = True
ElseIf Left(A1, 1) = "T" Then
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1)), _
TrailingMinusNumbers:=True
Cells.Select
Cells.EntireColumn.AutoFit
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "Rec Type"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Port Code"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Sec Code"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Tr Date"
Range("E1").Select
ActiveCell.FormulaR1C1 = "Tr Type"
Range("F1").Select
ActiveCell.FormulaR1C1 = "Curr"
Range("G1").Select
ActiveCell.FormulaR1C1 = "Cash Sec ID"
Range("H1").Select
ActiveCell.FormulaR1C1 = "Nominal"
Range("I1").Select
ActiveCell.FormulaR1C1 = "Base Amnt"
Range("J1").Select
ActiveCell.FormulaR1C1 = "Base Inc Amnt"
Range("K1").Select
ActiveCell.FormulaR1C1 = "Base Cash Eff"
Range("L1").Select
ActiveCell.FormulaR1C1 = "Local Amnt"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Local Inc Amnt"
Range("N1").Select
ActiveCell.FormulaR1C1 = "Local Cash Eff"
Range("A1:N1").Select
Selection.Font.Bold = True
Cells.Select
Cells.EntireColumn.AutoFit
ActiveWindow.Zoom = 85
Range("A1:N1").Select
Selection.AutoFilter
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Else: MsgBox "Werkt Niet"
End If
End Sub