MS OFFICE EXCEL

[Closed]
Report
Posts
3
Registration date
Monday November 12, 2012
Status
Member
Last seen
November 16, 2012
-
Posts
2368
Registration date
Sunday September 23, 2012
Status
Member
Last seen
December 13, 2018
-
Hello,


HOW DO I FIX A FORMULA TO CHECK THE FOLLOWING:


IF YEAR "2012" AND MONTH "FEBRUARY" THEN NO. OF DAYS IS 29 OR ELSE 28.
FOR JANUARY, MARCH, MAY, JULY, AUGUST, OCTOBER AND DECEMBER THE NO. OF DAYS IS 31 AND FOR APRIL, JUNE, SEPTEMBER AND NOVEMBER THE NO. OF DAYS IS 30 IRRESPECTIVE OF LEAP YEAR OF NOT.

PLEASE ADVISE.

REGARDS,
LANCY MENEZES
MUMBAI

1 reply

Posts
2368
Registration date
Sunday September 23, 2012
Status
Member
Last seen
December 13, 2018
45
Hi LANCY MENEZES,

To return the number of days in a month, use the following formula. Suppose cell A1 contains Feb-2012.

=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))

This will return 29, the number of days in February, 2012.

Please revert for clarification.