Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have a section of code for updating a TB Workbook and would like to create a loop circuling through the constants... Option Explicit Const INDEX1 As String = "a very long formula!" Const INDEX2 As String = "a very long formula!" Const INDEX3 As String = "a very long formula!" Const SITE1 As String = "CAS" Const SITE2 As String = "ADM" Const SITE3 As String = "ADMIN" Sub TB() Application.Calculation = xlCalculationManual Sheets(SITE1).Select Range("D8").Select ActiveCell.FormulaR1C1 = INDEX1 Range("D8").Select Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteFormulas Application.CutCopyMode = False Calculate Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteValues Range("D8").Select Sheets(SITE2).Select Range("D8").Select ActiveCell.FormulaR1C1 = INDEX2 Range("D8").Select Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteFormulas Application.CutCopyMode = False Calculate Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteValues Range("D8").Select Sheets(SITE3).Select Range("D8").Select ActiveCell.FormulaR1C1 = INDEX3 Range("D8").Select Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteFormulas Application.CutCopyMode = False Calculate Selection.Copy Range("D8:AC846").Select Selection.PasteSpecial Paste:=xlPasteValues Range("D8").Select Application.Calculation = xlCalculationManual End Sub Nothing i've tried works!! Thanks Will |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
do loops | Excel Worksheet Functions | |||
For next loops | Excel Discussion (Misc queries) | |||
How to Chart the Maximum Point within Two Loops | Charts and Charting in Excel | |||
Do loops | Excel Discussion (Misc queries) | |||
Max limit of 7 nested loops | Excel Worksheet Functions |