Dave Peterson wrote...
....
Lots of developers may hide the old stuff--but lots more hide stuff that they
need, but don't want to clutter the worksheet for the user.
While this may make life slightly easier for developers, it makes life
much, much harder for future maintainers, as the OP's case
demonstrates. If I could give one piece of advice to people developing
large spreadsheet models it'd be NEVER use hidden rows or columns, use
hidden worksheets (and don't hide anything on the hidden worksheets).
Those hidden rows/columns could contain important formulas, important values, or
even important information that some macro may need.
So true. With regard to macros, they should never use cells to store
information needed only by the macro and not by worksheet formulas. Use
defined names, which are stored with the workbook and can be evaluated
as needed.
And on top of that, if there are macros, you may be breaking them.
Only if they're hardcoded. As a rule of thumb, macros should NEVER have
ANY cell addresses in them. Macros should ONLY use defined names
referring to ranges. That's basic abstraction. Dismiss it at your
peril.
....
And remember that you may break other formulas--in other worksheets or even in
other workbooks.
Always best to trace dependents before deleting anything. Also doesn't
hurt to use a new worksheet to hold a list of all worksheet names in
the workbook (lots of macros and udfs to generate such lists in the
Google Groups archives for the Excel newsgroups), and in the columns to
the right of the name formulas like
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#NULL!")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#DIV/0!")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#VALUE!")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#REF!")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#NAME?")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#NUM!")
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"#N/A")
=COUNT(INDIRECT("'"&A1&"'!A1:IV65536"))
=COUNTIF(INDIRECT("'"&A1&"'!A1:IV65536"),"*")
which return the number of cells evaluating to each of the error
values, to numbers and to text, repectively, in the worksheet named in
A1. Note: recalc could be SLOW. If these change in workbooks other than
the one in which you delete anything, that's a clear indicator there's
a dependency. Always be prepared to undo, so macros ain't a good idea.