Public Sub Test()
Dim i As Integer, sFormula As String
sFormula = "="
For i = 1 To ThisWorkbook.Sheets.Count
If i >= 4 Then
sFormula = sFormula & "'" & ThisWorkbook.Sheets(i).Name & "'!R2C2+"
End If
Next
If sFormula <> "=" Then
sFormula = Left(sFormula, Len(sFormula) - 1)
ThisWorkbook.Sheets(1).Range("A1").FormulaR1C1 = sFormula
End If
End Sub
Public Sub OpenExcelBook()
Dim xlApp As Object, xlBook As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open("C:\1\Book1.xls") ' Открытие книги Excel
xlBook.Sheets(2).Activate ' Активация второго листа книги
xlBook.Sheets(2).Range("A10").Select ' Переход к ячейке A10
Set xlBook = Nothing: Set xlApp = Nothing
End Sub
Sub AutoFillRange()
ActiveCell.AutoFill Destination:=Range(ActiveCell, Cells(ActiveCell.Row + 187, ActiveCell.Column)), Type:=xlFillDefault
End Sub