Hello,
I was hoping someone could help me?
I am trying to run a basic loop over all sheets but two - sheet 1 and sheet 33 - the below is what I have - it loops over all sheets and doesn't skip 1 and 33.
many thanks in advance.
I was hoping someone could help me?
I am trying to run a basic loop over all sheets but two - sheet 1 and sheet 33 - the below is what I have - it loops over all sheets and doesn't skip 1 and 33.
VBA Code:
Sub restall_but()
Dim rs As Worksheet
For Each rs In ThisWorkbook.Worksheets
If rs.Name <> "UK pick up" And rs.Name <> "Template" Then
Range("C4").Select
ActiveCell.FormulaR1C1 = "='UK pick up'!R[4]C[12]"
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:C12"), Type:=xlFillDefault
Range("C4:C12").Select
Range("C9").Select
Selection.ClearContents
Range("L4").Select
ActiveCell.FormulaR1C1 = "='UK pick up'!R[15]C[3]"
Range("L4").Select
Selection.AutoFill Destination:=Range("L4:L12"), Type:=xlFillDefault
Range("L4:L12").Select
Range("L9").Select
Selection.ClearContents
Range("L12").Select
ActiveCell.FormulaR1C1 = "=TEXT('UK pick up'!R[15]C[3],""dd-mm-yyyy"")"
End If
Next rs
End Sub
many thanks in advance.