Sub Rabobank()
'
' Rabobank Macro
'
Application.ScreenUpdating = False
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
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), Array(13, 1 _
), Array(14, 1), Array(15, 1), Array(16, 1)), TrailingMinusNumbers:=True
Columns("A:A").EntireColumn.AutoFit
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Range("C1").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISBLANK(RC[-1]),"""",DATE(LEFT(RC[-1],4),MID(RC[-1],5,2),RIGHT(RC[-1],2)))"
Range("C1").Select
Selection.NumberFormat = "dd/mm/yyyy"
Selection.AutoFill Destination:=Range("C1:C45"), Type:=xlFillDefault
Range("C1:C45").Select
Columns("C:C").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
Range("D1:D45").Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("E1").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISBLANK(RC[-1]),"""",IF(RC[-2]=""D"",VALUE(RC[-1]),VALUE(-RC[-1])))"
Range("E1").Select
Selection.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)"
Selection.AutoFill Destination:=Range("E1:E45"), Type:=xlFillDefault
Range("E1:E45").Select
Columns("E:E").EntireColumn.AutoFit
Columns("E:E").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("C:D").Select
Range("D1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Range("D1").Select
Columns("D:D").EntireColumn.AutoFit
Range("D1:D45").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="0"
Selection.FormatConditions(1).Font.ColorIndex = 2
Columns("E:E").EntireColumn.AutoFit
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").EntireColumn.AutoFit
Selection.Insert Shift:=xlToRight
Selection.ColumnWidth = 9.13
Range("H1").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISBLANK(RC[1]),"""",RC[1])&"" ""&IF(ISBLANK(RC[2]),"""",RC[2])&"" ""&IF(ISBLANK(RC[3]),"""",RC[3])&"" ""&IF(ISBLANK(RC[4]),"""",RC[4])"
Range("H2").Select
Columns("H:H").EntireColumn.AutoFit
Range("H1").Select
Selection.AutoFill Destination:=Range("H1:H46"), Type:=xlFillDefault
Range("H1:H46").Select
Columns("H:H").Select
Range("H4").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-6
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Select
With Selection.Font
.Name = "Verdana"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Columns("I:M").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Range("A1:H42").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Key2:=Range("B1") _
, Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range("B1") _
, Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Application.ScreenUpdating = True
End Sub