View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default I need a february 29th row, but only if the day of year actually exists

Have you thought of using real dates?
In A1 enter 1/1/2009
Format to show the date however you like it (e.g 1-Jan-2009)
In A2 enter =A1+1 (or A1+7 to jump by weeks)
Copy down the column
If there is a 29 Feb, Excel will look after it
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"FatBytestard" wrote in message
...


I have a blood pressure tracker on the templates page (Microsoft's)
that can handle any year.

I just realized, however, that I made no proviso for leap years. So I
am going to add a 29th day in the February moth sheet of my workbook.

What I want to do is a formula along the lines of "if exist" that 29th
day of February in the chosen year, when true the date would be returned
to the cell location, and the plotted chart would respond accordingly.

If the day does not exist, the cell remains blank, and the plot figures
on the 28 day month.


Additional question:

Can the data set a plot is derived from be called out in a cell such
that the chart varies according to the cell contents, choosing a named
data set dependent on the result. So I could mark the sheet at the 28th
day row , and give it a name (28DayMonth), and I could mark a 29 day data
set, and name it LeapYear or LeapData, forcing the chart to use the added
row of data, yet keeping it out when the 29th day doesn't exist.