Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wish to move to the next worksheet if the current worksheet has the
text "no" in cell C21.I keep getting the message no "For or Goto" when I put a If /Then line in the code. All the worksheets are the same setup. Dim nm As String Dim x, y As Integer Sheets("DontDelete").Select x = Range("DontDelete!J6").Value Range("I8").Select For y = 1 To x nm = ActiveCell.Value Sheets(nm).Select Range("Q2:AD2").Select Selection.Copy Sheets("Timesheet").Select Range("A19").Select Selection.End(xlUp).Select ActiveCell.Offset(1, 0).Range("A1").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("DontDelete").Select ActiveCell.Offset(1, 0).Activate Next y |