Hi
I need add a new worksheet that outputs sheet name and box 7 data for each sheet onto a master spreadsheet.
I have been playing around some code but adding a third loop is a bit of nightmare and not ideal so I've just output to msgbox for testing per.
Would application.match be better to use than the 'is like'?
Any input, most appreciated!
Cheers
Danny
Sub Box7_V1()
Dim wsSheet As Worksheet
Dim Cell As Range
For Each wsSheet In Worksheets
Select Case UCase(wsSheet.Name)
Case "TEST" 'Excluded Worksheets
'Do nothing
Case Else
For Each Cell In wsSheet.Columns("C").Cells.SpecialCells(xlCellTypeConstants)
If Cell.Value Like "Total:" Then
Box7 = Cell.Offset(0, 6).Value
Box7F = Format(Box7, "£ #,##0.00")
End If
Next
MsgBox "Payment Summary - " & wsSheet.Name & vbNewLine & vbNewLine & _
"Box 7: " & vbNewLine & Box7F & vbNewLine & vbNewLine
End Select
Next wsSheet
End Sub
Bookmarks