LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Searching multiple workbooks

There are two approaches. For both, my tests worked only when all
workbooks were open.

First approach: assuming that your workbooks are all named with
consecutive dates. Further assuming that all sheets have the same name,
Sheet1 and the data are in column A:A. Let us say you need to sum five
consecutive dates, from 1/23/2006 to 1/27/2006. Let us further say that
you save your workbooks like 1-26-2006.xls

=SUM(COUNTIF(INDIRECT("'["&TEXT(DATE(2006,1,22)+ROW(1:5),
"m-d-yyyy")&".xls]Sheet1'!A:A"), _value_))

This is an array formula (enter with Shift+Ctrl+Enter). The expression

DATE(2006, 1, 22)

must be one date earlier than the dates you need to sum. The format
string:

"m-d-yyyy"

should be changed to reflect the format you actually use. Finally, in
the expression

ROW(1:5)

you need to change the 5 to whatever number of workbooks you are
attempting summation. Of course, instead of _value_ supply the value
that you want or a cell reference.

The second approach is more powerful, it allows you to go over any set
of workbooks (again, however, they must be open). Use a range (say
Sheet2!$K$1:$K$6). In the first cell (K1) type a label (e.g. workbooks)
and in the remaining cells (K2:K6) type the names of the workbooks (do
not forget the .xls).

=SUM(COUNTIF(INDIRECT("'["&T(OFFSET(Sheet2!$K$1, ROW(1:5),
0))&"]Sheet1'!A:A"), _value_))

again you need to array-enter it.

HTH
Kostis Vezerides

 
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
Changing source on multiple workbooks charlilot Links and Linking in Excel 1 January 26th 06 09:08 PM
AHHHH-Get Data from Multiple Excel workbooks JAA149 Excel Discussion (Misc queries) 5 October 30th 05 05:19 PM
Macro that will add data from multiple workbooks to the 1st open r jbsand1001 Excel Discussion (Misc queries) 0 April 23rd 05 07:52 PM
linking to multiple workbooks cwwolfdog Excel Discussion (Misc queries) 4 April 18th 05 05:29 PM
adding certain cells in multiple worksheets in multiple workbooks Stephen via OfficeKB.com Excel Worksheet Functions 1 February 4th 05 08:31 PM


All times are GMT +1. The time now is 08:22 PM.

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

About Us

"It's about Microsoft Excel"