MS OFFICE EXCEL

Closed
lancymenezes Posts 3 Registration date Monday November 12, 2012 Status Member Last seen November 16, 2012 - Nov 16, 2012 at 05:13 AM
Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 - Nov 16, 2012 at 08:12 AM
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
Related:

1 response

Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 69
Nov 16, 2012 at 08:12 AM
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.
0