Sub hui head Äèñöèïëèíà Ïðåïîäàâàòåëü Ãðóïïà Ëåêöèè Ïðàêò Ëàá Range A2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Sub hui()
head = "Äèñöèïëèíà Ïðåïîäàâàòåëü Ãðóïïà Ëåêöèè Ïðàêò. Ëàá."
Range("A2:F2") = Split(head)
Cells(1, 4).Value = "Âèä íàãðóçêè"
Dim arr() As String
head = "A1:A2 B1:B2 C1:C2 D1:F1"
arr = Split(head)
For I = 0 To 3
Range(arr(I)).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
.EntireColumn.AutoFit
End With
Next I
End Sub