|
Sub x12题1()
Dim RG As Range
Set RG = Intersect(Columns("q:r"), Rows("1:100")).SpecialCells(xlCellTypeConstants).EntireRow
Intersect(RG, Columns("p")) = 1
End Sub
Sub x12题2()
Dim x As Integer, wb1 As Workbook, wb2 As Workbook
Set wb1 = Workbooks.Open(ThisWorkbook.Path & "\A.xlsx")
Set wb2 = Workbooks("工作簿1")
For x = 1 To wb1.Sheets.Count
If x = 1 Then
wb1.Sheets(x).UsedRange.Copy wb2.Sheets("12集").Range("A21")
Else
wb1.Sheets(x).UsedRange.Offset(1, 0).Copy wb2.Sheets("12集").Range("A65536").End(xlUp).Offset(1, 0)
End If
Next x
wb1.Close True
End Sub |
|