Hi Ken -
Well, I futzed with it all day. Couldn't use the bracketing worksheets
because some of the data is textual, and I couldn't find one of the
limited 3-D functions that handled that. I didn't use a straigtforward
indirect method because I didn't want to populate more cells in the
summary sheet, which is saved off as text and imported to a Lotus Notes
database.
So I tried J-Walk's SHEETOFFSET function (See his Excel 2003) and a
vague memory of how I would do this years ago in XLM. That's what I
settled on, after a lot of digging, since it seemed a bit faster.
That's important--I can hit the head while this thing calculates and
still come back to the hour-glass. ;-) The summary sheet is ~5400 rows
by 14 columns. The idea remains to automate this as much as possible.
I defined a name as SHEETARRAY = GET.WORKBOOK(1)
GET.WORK(1) returns a array of fullpaths to each worksheet in order.
and a second name of COPYDATA as
=INDIRECT("'"&MID(INDEX(SHEETARRAY,2),FIND("]",INDEX(SHEETARRAY,2))+1,128
)&"'!"&ADDRESS(ROW(),COLUMN()))
Works like a champ. I was pleasantly surprised INDEX() worked with the
array like that. I put =COPYDATA in wherever needed.
Thanks.
...best, Hash
Ken Wright said:
But if there's nothing that says it absolutely has to be the second sheet
then my advice was going to be exactly the same as Rob's. I'd name the
second sheet 'start' and the third 'finish' or maybe just a and b, and then
use as Rob suggested
=SUM(start:finish!A1)
or
=SUM(a:b!A1) instead of references to a sheet2 or whatever the name would be
Then just drag your new sheet each time between a and b and drag the old one
out to the right of sheet b. Sheet1 will then only pick up data from any
sheet between a and b. There will be no data on sheets a or b so all you
will get is the data from your new sheet.
Failing that take a look at the INDIRECT function and then in a single cell
on your summary sheet put the name of the tab you are referring to. Use
that cell in your formulas and then just change the sheet name in that one
cell to refer to the one you want, eg if the name of your second sheet was
in cell C1 on your summary sheet then you could use
=INDIRECT(C1&"!A1")
on your summary sheet to refer to cell A1 on whatever sheet has it's name in
cell C1
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission
--------------------------------------------------------------------------