#### Topic: Automation of creation of the schedule

Good afternoon!
I ask to help with automation of following actions on initial given (sm a spoiler):
1 step: the initial data is selected on sheet excel;
2 step: the initial data is sorted by decrease of index U22;
3 step: on the basis of the sorted array indexes Xi and Yi settle up. And Xi - the account relation the accumulative total to an amount of lines on column Y11 (the formula = (\$BE\$4:BE5) / the account (\$BE\$4: \$ BE\$32)), and Yi - the total the accumulative total to a total sum on column Y11 (the formula = (\$BE\$4:BE5) / the sums (\$BE\$4: \$ BE\$32));
4 step: according to Xi and Yi the dot chart, and in it of value x=Xi, values y=Yi is formed.
It is necessary to tire out somehow the initial data in array VB. I forgot all ))
Can  pair of key strings of the code by a subject, beauty with forms and schedules I, clearly put, itself I will direct
[spoiler "the initial data"] [CSV= ] Y11 U22
1 0,00011
1 0,00000
1 0,00000
1 0,00000
2 0,00000
3 0,00483
4 0,00000
4 0,00007
5 0,00000
5 0,00099
5 0,00000
6 0,00072
6 0,00368
6 0,00000
6 0,00010
7 0,00000
8 0,00000
8 0,00242
8 0,00000
9 0,00044
9 0,00001
9 0,00363
9 0,00128
9 0,00228
10 0,00091
10 0,00996
10 0,01942
11 0,03672
13 0,00674
[/spoiler]

#### Re: Automation of creation of the schedule

PlanB wrote:

to tire out the initial data in array VB

``````Type arrYU
Y11 As Integer
U22 As Double
End Type
Sub Makros1 ()
Dim arr () As arrYU
Dim RowMax As Long
With ThisWorkbook. Worksheets ("List1").UsedRange
RowMax =.Rows. Count +.Row - 1
End With
Dim stroki As Range, rng As Range
Set stroki = ThisWorkbook. Worksheets ("List1").Range ("A2", "A" and RowMax)
Dim i As Integer
For Each rng In stroki
ReDim Preserve arr (i)
arr (i).Y11 = rng. Value
arr (i).U22 = rng. Offset (0, 1).Value
i = i + 1
Next
...
End Sub``````