Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Master's please help me with my code; Doing a loop to copy valuesfrom a series Sheets of another workbook.. | Excel Programming | |||
apply Macro to all sheets in workbook - loop | Excel Programming | |||
Loop worksheets workbook | Excel Programming | |||
Loop through workbooks and worksheets in each workbook | Excel Programming | |||
Loop through all sheets in workbook | Excel Programming |