1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| Sub Macro8()
'
Sheets("Temporaire").Visible = True
Sheets("Temporaire").Select
Range("A1").Select
Sheets("Aging").Select
Range("A12").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Temporaire").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
ActiveSheet.Range(Selection, Selection.End(xlDown)).RemoveDuplicates Columns:=1, Header:=xlNo
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("ConsoByCurr").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A4").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Range("G4").Select
ActiveSheet.Paste
Range("G4").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Range("M4").Select
ActiveSheet.Paste
Sheets("Temporaire").Visible = xlVeryHidden
Sheets("ConsoByCurr").Select
Range("B4").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("B4:E5")
Range("B4:E5").Select
Range("H4").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("H4:K5")
Range("H4:K5").Select
Range("N4").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("N4:Q5")
Range("N4:Q5").Select
Cells.Select
Selection.Style = "Comma"
Range("B1").Select
Sheets("Aging").Select
Range("B10").Select
MsgBox "Dear " & Application.UserName & "," & vbCr & vbCr & "The data was been sucessfully consolidated!" & vbCr & "Please check the result on sheet « ConsoByCurr ».", vbInformation + vbOKOnly, "Consolidation"
End Sub |
Partager