How to sort a text table according to the template?

I'm not a real programmer, but to optimize the production process to create acts of reporting the problem was solved with the help of macro, you wonder whether it is possible to solve this problem in a more optimal way than 4 nested cycles + 2 additional variables and 2 terms because I this macro hangs up other calculations in the book:
There is a monthly-daily schedule with a list of works for 1 year. For some types of work(known) need to prepare a model act on the hidden work each month (i.e. the data array number of studies * 12 periods) of These work in a month-daily chart can be entered out of order. There is also a array of ties consisting of empty elements and of the same types of jobs located within the sequence (no matches, each position is unique, if no uniqueness is provided by manually setting Postfix) you want to sort for numbering an array with monthly closing by the array of ties, so in the end, in each month (column) the sequence of the work was going on array relations. How will relative to each other to house the units of work is not important. If work related, the sequence of acts must go one after the other.

The question of whether to solve this problem by using Excel formulas? If Yes, where to dig?
June 27th 19 at 14:53
1 answer
June 27th 19 at 14:55
You want to sort
Tab "Data" block button "Sort".
monthly-daily schedule with a list of works for 1 year.
To use Excel instead of Project, and intended to do this.

Find more questions by tags AlgorithmsExcelMicrosoft OfficeProgramming