Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You were right – the MS work-around worked,
as follows: Sub Test1() Dim x As Object Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select For Each x In ActiveWindow.SelectedSheets ActiveCell.FormulaR1C1 = "=(RC[-4]+RC[-3])" Range("G2").Select Next x End Sub But this didn’t: Sub Test1() Dim x As Object Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select For Each x In ActiveWindow.SelectedSheets ActiveCell.FormulaR1C1 = "=(RC[-4]+RC[-3])" Range("G2").Select Next x End Sub The reason for listing the sheets in a vertical fashion is because the actual problem involves several hundred sheets and wrap-around was cumber- some. Any way to reference these sheets in a global manner, without listing each and every one, like "Sheet1-Sheet3"? Much thanks for your time. Bruce Erlichman *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to make a macro to clear multiple cells from multiple worksheets? | Excel Worksheet Functions | |||
SUMIF across multiple worksheets workaround help | Excel Worksheet Functions | |||
Pivot table page filter not accepting multiple values. Workaround? | Excel Worksheet Functions | |||
looping through worksheets | Excel Programming | |||
looping through worksheets | Excel Programming |