Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Newbie
 
Posts: n/a
Default Linking multiple workbooks

I have to extract a value from the same cells in over 30 workbooks. Is there
a quick way to name all the workbooks in an array and state the array in the
cell formula?
  #2   Report Post  
Posted to microsoft.public.excel.misc
bgeier
 
Posts: n/a
Default Linking multiple workbooks


This may suit your needs
It works only if all of the open workbooks are open.

Sub WorkBookLoop()
Dim intWorkBookCounter As Integer
Dim intPlaceRow As Integer

intPlaceRow = 1

For intWorkBookCounter = 1 To Workbooks.Count
Workbooks(intWorkBookCounter).Activate
ThisWorkbook.Worksheets("Sheet4").Cells(intPlaceRo w, 2) =
Workbooks(intWorkBookCounter).Worksheets("Sheet1") .Cells(1, 1).Value
intPlaceRow = intPlaceRow + 1
Next intWorkBookCounter
End Sub


If having all of the workbooks open is not feasible try this solution
from John Walkenbach.

http://j-walk.com/ss/excel/tips/tip82.htm

I have used this several times and have had no trouble with it at all,
and was amazed at the speed it runs (1 application I have used it on
made about 600 semi-random queries populating a userform, and there was
no noticable difference in the time it took to read the same values from
an open workbook)
The website, does an excellent job of explaining how it works and how
to use it.


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=542052

  #3   Report Post  
Posted to microsoft.public.excel.misc
Newbie
 
Posts: n/a
Default Linking multiple workbooks

Thanks, but I was wondering if there was a method for the shortening the
worksheet formula?

"bgeier" wrote:


This may suit your needs
It works only if all of the open workbooks are open.

Sub WorkBookLoop()
Dim intWorkBookCounter As Integer
Dim intPlaceRow As Integer

intPlaceRow = 1

For intWorkBookCounter = 1 To Workbooks.Count
Workbooks(intWorkBookCounter).Activate
ThisWorkbook.Worksheets("Sheet4").Cells(intPlaceRo w, 2) =
Workbooks(intWorkBookCounter).Worksheets("Sheet1") .Cells(1, 1).Value
intPlaceRow = intPlaceRow + 1
Next intWorkBookCounter
End Sub


If having all of the workbooks open is not feasible try this solution
from John Walkenbach.

http://j-walk.com/ss/excel/tips/tip82.htm

I have used this several times and have had no trouble with it at all,
and was amazed at the speed it runs (1 application I have used it on
made about 600 semi-random queries populating a userform, and there was
no noticable difference in the time it took to read the same values from
an open workbook)
The website, does an excellent job of explaining how it works and how
to use it.


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=542052


  #4   Report Post  
Posted to microsoft.public.excel.misc
bgeier
 
Posts: n/a
Default Linking multiple workbooks


If you mean

"ThisWorkbook.Worksheets("Sheet4").Cells(intPlaceR o w, 2) =
Workbooks(intWorkBookCounter).Worksheets("Sheet1") .Cells(1, 1).Value"

not really, since you are looking at 2 different workbooks, you have to
tell Excel which workbook to use for what.

Check out the link from John Walkenbach, it may be easier in the long
run


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=542052

  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default Linking multiple workbooks

Try
http://www.rondebruin.nl/summary2.htm


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


"Newbie" wrote in message ...
I have to extract a value from the same cells in over 30 workbooks. Is there
a quick way to name all the workbooks in an array and state the array in the
cell formula?



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
Print Multiple Workbooks malycom Excel Discussion (Misc queries) 0 March 10th 06 09:51 AM
Organizing Multiple Workbooks tksilver Excel Discussion (Misc queries) 2 February 15th 06 03:30 PM
Linking problems between two workbooks - Excel 2000 SP3 Ramon Setting up and Configuration of Excel 0 January 12th 06 04:01 PM
Linking WorkBOOKS across directories maurices5000 Excel Worksheet Functions 1 December 16th 05 09:41 PM
Linking between multiple worksheets, workbooks and columns cmvbfore Excel Discussion (Misc queries) 0 October 4th 05 06:58 PM


All times are GMT +1. The time now is 10:24 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"