H
Howard
Trying to do the obvious, run this code on the four sheets named in the case.
Sheet names are correct, and code works just fine in another sub run on one sheet.
Code is in sheet 1 module.
Tried ThisWorkbook and a standard module also... no go.
Thanks.
Howard
Option Explicit
Sub MyAURangeValuesAllSheets()
Dim ws As Worksheet
Dim c As Range
For Each ws In ActiveWorkbook.Worksheets
Select Case ws.Name
Case "Sheet1", "Sheet2", "Sheet3", "Sheet4"
For Each c In Range("AU1:AU10")
If c = "W" Then
c.Offset(0, 16).Resize(1, 13).Copy
Cells(Rows.Count, "M").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End If
If c = "P" Then
c.Offset(0, 16).Resize(1, 13).Copy
Cells(Rows.Count, "AA").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End If
Next
End Select
Next ws
End Sub
Sheet names are correct, and code works just fine in another sub run on one sheet.
Code is in sheet 1 module.
Tried ThisWorkbook and a standard module also... no go.
Thanks.
Howard
Option Explicit
Sub MyAURangeValuesAllSheets()
Dim ws As Worksheet
Dim c As Range
For Each ws In ActiveWorkbook.Worksheets
Select Case ws.Name
Case "Sheet1", "Sheet2", "Sheet3", "Sheet4"
For Each c In Range("AU1:AU10")
If c = "W" Then
c.Offset(0, 16).Resize(1, 13).Copy
Cells(Rows.Count, "M").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End If
If c = "P" Then
c.Offset(0, 16).Resize(1, 13).Copy
Cells(Rows.Count, "AA").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End If
Next
End Select
Next ws
End Sub