Код: Выделить всё
Sheets("Ход поединков").Range("B3 :D 482").ClearContents
Код: Выделить всё
Application.Volatile
Модератор: Naeel Maqsudov
Код: Выделить всё
Sheets("Ход поединков").Range("B3 :D 482").ClearContents
Код: Выделить всё
Application.Volatile
Код: Выделить всё
Sheets("Ход поединков").Range("B3:D482").ClearContents
Код: Выделить всё
Application.Volatile
Код: Выделить всё
Range("K5") = "Завершено"
Код: Выделить всё
Sub Создать_протокол_поединков()
Dim Sh As Worksheet, i As Long
i = 1
Sheets("Протокол поединков").Cells.Clear
For Each Sh In ThisWorkbook.Sheets
If InStr(1, Sh.Name, "(") > 0 Then
Sh.[A1:M39].Copy Sheets("Протокол поединков").Cells(i, 1)
i = i + 39
End If
Next Sh
End Sub
Код: Выделить всё
Sub Создать_протокол_поединков()
Dim Sh As Worksheet, i As Long, x As Range
i = 1
Sheets("Протокол поединков").Cells.Clear
For Each Sh In ThisWorkbook.Sheets
If InStr(1, Sh.Name, "(") > 0 Then
If [A30].Text = "" Then Set x = Sh.[A1:M39] Else Set x = Sh.[A1:M78]
x.Copy
Sheets("Протокол поединков").Cells(i, 1).PasteSpecial Paste:=xlPasteValues
i = IIf([A30].Text = "", i + 39, i + 78)
End If
Next Sh
End Sub
Код: Выделить всё
Sub Создать_протокол_поединков()
Dim Sh As Worksheet, i As Long, x As Range
i = 1
Sheets("Протокол поединков").Cells.Clear
For Each Sh In ThisWorkbook.Sheets
If InStr(1, Sh.Name, "(") > 0 Then
If Sh.[A30].Text = "" Then Set x = Sh.[A1:M39] Else Set x = Sh.[A1:M78]
With Sheets("Протокол поединков")
x.Copy .Cells(i, 1)
.Cells(Resize(x.Rows.Count, x.Columns.Count)).Value = .Cells(Resize(x.Rows.Count, x.Columns.Count)).Value
End With
If Sh.[A30].Text = "" Then i = i + 39 Else i = i + 78
End If
Next Sh
End Sub
Код: Выделить всё
.Cells(Resize(x.Rows.Count, x.Columns.Count)).Value = .Cells(Resize(x.Rows.Count, x.Columns.Count)).Value