A
al
Trying to make a macro run on several sheets between 2 sheets "UK" &
"Others" but not working
i.e macro need to loop on sheets France,Germany,Italy,Spain . Pls help
Sub Loopshhets()
Dim WS As Worksheet
Dim roomnight
Dim bednight
For Each WS In Worksheets
If WS.Name <> "UK" And WS.Name <> "OTHERS" Then
Let roomnight = (Range("AL27").Value)
ActiveWorkbook.PrecisionAsDisplayed = False
Range("AL28:AL30").Copy
Range("D28").Select
ActiveCell.Offset(0, roomnight).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Let bednight = (Range("AL36").Value)
ActiveWorkbook.PrecisionAsDisplayed = False
Range("AL37:AL39").Copy
Range("D37").Select
ActiveCell.Offset(0, bednight).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
End If
Next
End Sub
"Others" but not working
i.e macro need to loop on sheets France,Germany,Italy,Spain . Pls help
Sub Loopshhets()
Dim WS As Worksheet
Dim roomnight
Dim bednight
For Each WS In Worksheets
If WS.Name <> "UK" And WS.Name <> "OTHERS" Then
Let roomnight = (Range("AL27").Value)
ActiveWorkbook.PrecisionAsDisplayed = False
Range("AL28:AL30").Copy
Range("D28").Select
ActiveCell.Offset(0, roomnight).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Let bednight = (Range("AL36").Value)
ActiveWorkbook.PrecisionAsDisplayed = False
Range("AL37:AL39").Copy
Range("D37").Select
ActiveCell.Offset(0, bednight).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
End If
Next
End Sub