Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub UserForm_Click()
- End Sub
- Private Sub CommandButton1_Click()
- Range("A1:Y50506").Select
- Selection.Copy
- Sheets.Add After:=ActiveSheet
- Sheets("Foglio2").Select
- Sheets("Foglio2").Name = "Script"
- ActiveSheet.Paste
- End Sub
- Private Sub CommandButton2_Click()
- Range("B6:B372").Select
- ActiveWorkbook.Worksheets("Script").Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("Script").Sort.SortFields.Add Key:=Range("B6:B372") _
- , SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:= _
- "A01,A02,A03,A04,A05,A06,A07,A08,A09,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,A32,A33,A34,A35,A36,A37,A38,A39,A40,A41,A42,A43,A44,A45,A46,A47,A48,A49,A50,A51,A52,A53,A54,A55,A56,A57,A58,A59,A60,A61,A62,A63,A64" _
- , DataOption:=xlSortNormal
- With ActiveWorkbook.Worksheets("Script").Sort
- .SetRange Range("B6:B372")
- .Header = xlGuess
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- ActiveWindow.SmallScroll Down:=-12
- End Sub
- Private Sub CommandButton3_Click()
- AggA10
- End Sub
- Private Sub AggA10()
- Dim i, ii As Long
- Dim S As String
- S = "A0"
- Dim na, ng, nd, nh, ne, nf As Integer
- na = 1
- For i = 1 To 5000 Step 1
- If Cells(i, "B").Value Like "*A0" & na & "*" Then
- Cells(i, "B").EntireRow.Insert
- Cells(i, "B").Value = "A0" & na
- na = na + 1
- End If
- Next
- AggA100
- End Sub
- Private Sub AggA100()
- Dim i, ii As Long
- Dim S As String
- Dim na, ng, nd, nh, ne, nf As Integer
- na = 10
- For i = 1 To 5000 Step 1
- If Cells(i, "B").Value Like "*A" & na & "*" Then
- Cells(i, "B").EntireRow.Insert
- Cells(i, "B").Value = "A0" & na
- na = na + 1
- End If
- Next
- AggA09
- End Sub
- Private Sub AggA09()
- Dim i, ii As Long
- Dim S As String
- Dim na, ng, nd, nh, ne, nf As Integer
- na = 10
- For i = 1 To 5000 Step 1
- If Cells(i, "B").Value Like "*A09*" Then
- Cells(i, "B").EntireRow.Insert
- Cells(i, "B").Value = "A09"
- na = na + 1
- End If
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement