Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have used Ron de Bruins code for creating a summary spreadsheet but I need to modify it so that it refers to a range that is specified in a worksheet rather than in the macro. The reason for this is that fields may need to be added or removed, depending on user requirements and I need to give them that flexibility (also they wont mess with the code that way either). Does anyone know how I can move that part of the code to look at a spreadsheet values instead? The code is: 'The links to the first sheet will start in row 2 RwNum = 1 For Each Sh In Basebook.Worksheets If Sh.Name < Newsh1.Name And Sh.Visible And Sh.Name Like ("DT - *") Then ColNum = 1 RwNum = RwNum + 1 'Copy the sheet name in the A column Newsh1.Cells(RwNum, 1).Value = Sh.Name For Each myCell In Sh.Range("B1,C79,D79,H79,I79,C80,D80,H80,I80,C84,D 84,H84,I84,C81,D81,H81,I81,C82,D82,H82,I82,C83,D83 ,H83,I83,C85,D85,H85,I85,c16,d16,h16,i16,D85,I55,c 94,D94,H94,I94,d55,h97,h98,h99,h100,h101,h102") '<--Change the Range ColNum = ColNum + 1 Newsh1.Cells(RwNum, ColNum).Formula = "='" & Sh.Name & "'!" & myCell.Address(False, False) Next myCell End If Next Sh Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically add a column to summary sheet if another worksheet i | Excel Worksheet Functions | |||
Make all values of a 3D named range appear on summary sheet | Excel Discussion (Misc queries) | |||
Copy Several named Range in many sheets to a summary sheet | Excel Programming | |||
summary data sheet from worksheet to worksheet | Excel Worksheet Functions | |||
Summarize multiple worksheet detail on summary sheet | Excel Discussion (Misc queries) |