View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default leap-year condition

Michael

=IF(MONTH(Feb!A33)=2,Feb!C33,Feb!C32)

Assumes your sheet for Feb is named "Feb"

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Michael" wrote in message
...
I have a master spreadsheet for one year at a time to calculate auto

milleage. On the February page for the last day of the month of the current
year it read 3/1. When this spreadsheet is used next year (a leapyear) that
cell should read 2/29. Is there an IF formula that will enable me to have
the March sheet (Cell B1 for instance, see below) use the information from
Feb C33 only when A33 reads 2/29, and from C32 when A33 reads 3/1?



A B C
Date Begining End of Trip
of Trip

1 | 2/1
...
32| 2/28
33| 2/29