Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Summary sheet

Hello, any help on the following would be appreciated...

I want to create a sheet that has formulas which refer to the same ranges in
a varying number of workbooks in a specified folder. I am just learning VBA
so I am not sure the best approach.

Thanks in advance.
--
Ariel Dugan
Assistant Manager
Down To Earth Natural Foods
808-947-7678 Phone
808-943-8491 Fax
808-282-5916 Cell



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Summary sheet

Sub AddFormulas()
Dim bk as Workbook, sh as Worksheet
Dim i as Long, fName as String
' create a new one sheet workbook
set bk = Workbooks.Add(Template:=xlWBATWorksheet)
' set a reference to a sheet in the book
set sh = bk.Worksheets(1)
' mark the first row where you want a formula
i = 1
' get the name of the first workbook in the
' directory
fname = Dir("C:\MyFolder\*.xls")
do While fName < ""
' build the linking formula
fName ="='C:\MyFolder\[" & fName & "]Sheet1'!$B$9"
' place the formula in the cell (F1 is the first in this example)
sh.cells(i,"F").Formula = fName
' increment the row counter
i = i + 1
' get the next filename
fName = dir()
Loop
bk.SaveAs "C:\MySummaries\MySummary1.xls"
End Sub

--
Regards,
Tom Ogilvy




"AD108" wrote in message
...
Hello, any help on the following would be appreciated...

I want to create a sheet that has formulas which refer to the same ranges

in
a varying number of workbooks in a specified folder. I am just learning

VBA
so I am not sure the best approach.

Thanks in advance.
--
Ariel Dugan
Assistant Manager
Down To Earth Natural Foods
808-947-7678 Phone
808-943-8491 Fax
808-282-5916 Cell





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Summary sheet

Hi AD108

Maybe this one
http://www.rondebruin.nl/summary2.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"AD108" wrote in message ...
Hello, any help on the following would be appreciated...

I want to create a sheet that has formulas which refer to the same ranges in
a varying number of workbooks in a specified folder. I am just learning VBA
so I am not sure the best approach.

Thanks in advance.
--
Ariel Dugan
Assistant Manager
Down To Earth Natural Foods
808-947-7678 Phone
808-943-8491 Fax
808-282-5916 Cell





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i copy data from a tabbed working sheet to a summary sheet StephenF Excel Discussion (Misc queries) 1 March 15th 07 03:40 PM
Summary Sheet Brian Excel Worksheet Functions 3 August 18th 06 06:28 PM
Relative Sheet Reference (Summary Sheet) [email protected] Excel Discussion (Misc queries) 2 October 1st 05 10:42 AM
Summary sheet Dennis Allen Excel Programming 16 September 17th 04 04:45 PM
Summary sheet help John[_55_] Excel Programming 1 September 11th 03 05:32 PM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"