Problems evaluating defined names in VBA
Hi Anders M,
Just for extra info:
When I work with dynamic charts, I have found it easier to add a hidden
worksheet named "Scratchpad" to the workbook. I then enter most of my
formulas on this sheet. I can then see them easily and build up formulas
sort of piece-meal and verify them as I continue to build the workbook.
So for example, I have a gas mileage log for my car. The Mileage worksheet
contains all of the data. On the Scratchpad worksheet, I have the following
formulas with names assigned to them:
LastRow =COUNTA(Mileage!A:A)
addrDatabase
=ADDRESS(1,1,1,TRUE,"Mileage")&":"&ADDRESS(LastRow ,14,1,TRUE)
addrDatabase currently evaluates to:
Mileage!$A$1:$N$153
....then I assign the name "Database" (in the Define Names dialog box) to
refer to =INDIRECT(addrDatabase).
Notice that addrDatabase above includes the "Mileage" worksheet name in the
formula.
I have other formulas also (for each column of data), which are handled
similarly, and are then used to build charts.
--
Regards,
Bill Renaud
|