複数のシートをまとめる(指定範囲)
Sub matome()
Sub matome()
Dim LastR As Long, TgtR As Long Dim Sh As Worksheet, TgtSh As Worksheet
' まとめるシート名はSheet1
Set TgtSh = Sheets("Sheet1")
Application.ScreenUpdating = False
' TgtR = 1
' もとのシートのサイトの行をD列で探す
' もとのシートのサイトの行をD列で探す
TgtR = TgtSh.Range("D65536").End(xlUp).Row + 1
' TgtSh.Rows("1:" & TgtSh.Range("A65536").End(xlUp).Row).Delete
For Each Sh In ThisWorkbook.Worksheets
If Sh.Name <> TgtSh.Name Then
With Sh
LastR = .Range("A65536").End(xlUp).Row
If LastR > 1 Then
' .Rows("1:" & LastR).Copy TgtSh.Rows(TgtR)
.Rows("10:33").Copy TgtSh.Rows(TgtR)
End If
End With
TgtR = TgtSh.Range("A65536").End(xlUp).Row + 1
End If
Next
Application.ScreenUpdating = True
End Sub
条件付き最大値を求める
=MAX(INDEX ( ( C2:C65<200)*C2:C65,))
このwikiの更新情報RSS