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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| Sub Button()
'
' Copy of RuleA to avoid break in the rules
Sheets("RuleA").Select
Range("A2:L2").Select
Selection.AutoFill Destination:=Range("A2:L1000"), Type:=xlFillDefault
' Copy of RuleB to avoid break in the rules
Sheets("RuleB").Select
Range("A2:L2").Select
Selection.AutoFill Destination:=Range("A2:L1000"), Type:=xlFillDefault
' Copy of RuleC to avoid break in the rules
Sheets("RuleC").Select
Range("A2:L2").Select
Selection.AutoFill Destination:=Range("A2:L1000"), Type:=xlFillDefault
' Copy of LiteD to LiteDraw, so the sorting can be done
Sheets("LiteD").Select
Range("A2:J2000").Select
Selection.Copy
Sheets("RuleDraw").Select
Range("A2").Select
ActiveSheet.Paste
Columns("A:K").Sort Key1:=Range("K2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
' Copy of RuleD to avoid break in the rules
Sheets("RuleD").Select
Range("A2:J2").Select
Selection.AutoFill Destination:=Range("A2:J1000"), Type:=xlFillDefault
' Cleaning of RuleEraw
Sheets("RuleEraw").Select
Range("A2:J2000").Select
Selection.ClearContents
' Copy of the content of LiteE and LiteD_E
Sheets("LiteE").Select
Range("A2:J750").Select
Selection.Copy
Sheets("RuleEraw").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("LiteD_E").Select
Range("A2:J2000").Select
Selection.Copy
Sheets("RuleEraw").Select
Range("A1000").Select
ActiveSheet.Paste
' Sorting of RuleEraw
Columns("A:K").Sort Key1:=Range("K2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
' Find and replace the strings difference between RuleD and RuleE
Cells.Replace What:="Approved Purchasing Process (Under Scrutiny)", _
Replacement:="UNDER SCRUTINY", LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Cells.Replace What:="Approved Purchasing Process", Replacement:= _
"EXCEPTION VIA CONTRACT", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase _
:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub |
Partager