Put this vba in a module and give it a try.
Notes make it largely self explanatory. Please ask if anything is not clear.
The condition to delete rows where units =0 means that there are rows with values in other columns being deleted. It is consistent with ProContractor macro, but is it what you want?
Sub CopySheetsToGail()
Application.ScreenUpdating = False
Dim ws As Worksheet, Gail As Worksheet
Dim cel As Range
Dim msg As String
Dim nextRow As Long, myCount As Long
msg = "Sheets copied to Gail: " & vbCr & vbCr
myCount = 0
'create new worksheet "Gail" (old sheet "Gail" is deleted)
Application.DisplayAlerts = False
On Error Resume Next
Sheets("Gail").Delete
Err.Clear
With ThisWorkbook
Set Gail = .Sheets.Add(After:=.Sheets(.Sheets.count))
Gail.Name = "Gail"
End With
Application.DisplayAlerts = False
For Each ws In ThisWorkbook.Worksheets
If ws.Visible = True And UCase(ws.Range("AR1").Value) = "TASK CODE" Then
msg = msg & ws.Name & vbCr
'place headings in sheet "Gail"
myCount = myCount + 1
If myCount = 1 Then ws.Range("AR1:BB1").Copy Destination:=Gail.Range("A1")
'copy other values
nextRow = Gail.UsedRange.Rows.count + 1
ws.Range("AR3:BB28").Copy
Gail.Range("A" & nextRow).PasteSpecial xlPasteValues
Gail.Range("A" & nextRow).PasteSpecial xlPasteColumnWidths
End If
Next ws
'tidy up
With Gail
'delete blank rows
.Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
'delete rows where units = 0
lastRow = .UsedRange.Rows.count
.Range("A1").AutoFilter Field:=3, Criteria1:="0.00"
.Range("A2:A" & lastRow).SpecialCells(xlCellTypeVisible).EntireRow.Delete
.AutoFilterMode = False
'change text to upper case
For Each cel In .UsedRange
cel.Value = UCase(cel.Value)
Next cel
.Range("A1").Select
End With
MsgBox msg
Application.ScreenUpdating = True
End Sub
Bookmarks