View Single Post
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

B2: =DAY(DATE(YEAR(B1),MONTH(B1)+1,0))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lewis Koh" wrote
in message ...

B1= 29/07/2005


B2=IF(MONTH(B1)=1,31,IF(MONTH(B1)=2,28,IF(MONTH(B1 )=3,31,IF(MONTH(B1)=4,30,I
F(MONTH(B1)=5,31,IF(MONTH(B1)=6,30,IF(MONTH(B1)=7, 30,B3)))))))


B3=IF(MONTH(B1)=8,31,IF(MONTH(B1)=9,30,IF(MONTH(B1 )=10,31,IF(MONTH(B1)=11,30
,31))))

I wanted to get the number of days from B1 but I can't seems to join B2
and B3 together. Is this a limitation in excel? Is there a better way to
get the number of days from the month itself?


--
Lewis Koh
------------------------------------------------------------------------
Lewis Koh's Profile:

http://www.excelforum.com/member.php...o&userid=25712
View this thread: http://www.excelforum.com/showthread...hreadid=391281