View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.programming
Archimedes' Lever Archimedes' Lever is offline
external usenet poster
 
Posts: 63
Default Hide, unhide macro

On Mon, 15 Jun 2009 14:29:50 +0100, "Patrick Molloy"
wrote:

the change to the Annual Data sheet was to remove the "hard" dates except
Jan 1st and replace with

A12: =A11+1
and replicate down



Which fails between a 365 day year and a 366 day year.

It is a separate data sheet, so the hide/unhide call has to be acted on
that sheet as well.

The dates are explicit calls, not N+1. The chart carries dates and gets
the test data from lookups to the original month sheets, INCLUDING the
2/29 row.

The chart automatically sizes correctly when the sheets have 2/29 row
hidden. So does the February chart. It doesn't get any more simple than
to just make a hide and unhide routine based on an already performed leap
year test for the February and Annual data sheet.