Sub summary() Dim MonthRng As Range Dim i As Integer Dim sh As Worksheet Dim M As String Dim shMonthly As Worksheet
Set shMonthly = Sheets(1) Set MonthRng = Sheet2.Range("A2:A13").Find(CStr(shMonthly.Range("C1").Value), , xlValues, xlWhole) For Each sh In ThisWorkbook.Worksheets
If sh.Name <> "Monthly Service" And sh.Name <> "CONDITIONS" Then For i = 3 To sh.Range("A" & Rows.Count).End(xlUp).Row M = Val(MonthRng.Offset(, 1).Value) If Month(sh.Range("H" & i).Value) = M Then With shMonthly .Range("B" & .Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Row).Value = sh.Range("I" & i).Value .Range("C" & .Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Row).Value = sh.Range("B1").Value .Range("D" & .Range("D" & Rows.Count).End(xlUp).Offset(1, 0).Row).Value = sh.Range("C" & i).Value .Range("E" & .Range("E" & Rows.Count).End(xlUp).Offset(1, 0).Row).Value = sh.Range("A" & i).Value End With End If Next i End If Next sh End Sub
Hi ImranBhatti
Should I paste this in a Button, or just on the page under General?
Bookmarks