Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case code error | Excel Programming | |||
Clean this select case code up a bit. | Excel Programming | |||
Code not working, copy in Select Case section not copying over. | Excel Programming | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Simplify Code - Select Case | Excel Programming |