View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rich/rerat Rich/rerat is offline
external usenet poster
 
Posts: 39
Default I need a february 29th row, but only if the day of year actually exists

FatBytestard,
For the February Worksheet.
A1: Date Header
A2=2/1/09 (year will increase with new workbook)
A3: =A2+1
Drag cell contacts to A28.
In Cell A29 place the following formula:
=IF(DAY(A2+28)<29,"",A2+28)

For charting just include Row#30 in your range.

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) <message rule
<<Previous Text Snipped to Save Bandwidth When Appropriate


"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.