Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have tried to adapt previous macro from previous post with different
range - but not working - can someone correct pls Sub UpdateAllRevPeriod1() Dim WS As Worksheet Dim MinIndex As Long Dim MaxIndex As Long Dim RngToCopy As Range ActiveWorkbook.PrecisionAsDisplayed = False Application.ScreenUpdating = False 'Prevents the user from seeing the screen MinIndex = Worksheets("Pivot").Index MaxIndex = Worksheets("End").Index If MinIndex MaxIndex Then 'swap them MinIndex = MaxIndex MaxIndex = Worksheets("Pivot").Index End If For Each WS In ActiveWorkbook.Worksheets With WS If .Index MinIndex _ And .Index < MaxIndex Then 'do the work Set RngToCopy = .Range("AM84:AM86") RngToCopy.Copy Range("AL84").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False End If End With Next WS End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dave phlogiston appears in spreadsheet cell when I type Dave P | Excel Discussion (Misc queries) | |||
Excel -- Navigation Toolbar for Workbook Sheets -Dave Peterson | Excel Discussion (Misc queries) | |||
Rename Multiple Sheets - Help with Mr Dave Peterson's Code | Excel Programming | |||
Help with Mr. Dave Peterson's Code for Consolidating Many Sheets to One | Excel Programming | |||
VLOOKUP PART 2....(Dave Paterson) | Excel Programming |