Excel/Excel date


Seeking function:

I've created the following cells on an Excel spreadsheet

A1:=IF(OR(MONTH(NOW())=1,MONTH(NOW())=2,MONTH(NOW())=3),"January", IF(OR(MONTH(NOW())=4,MONTH(NOW())=5,MONTH(NOW())=6),"April",IF(OR(MONTH(NOW())=7,MONTH(NOW())=8,MONTH(NOW())=9),"June","September")))


A14:=IF(OR(MONTH(NOW())=1,MONTH(NOW())=2,MONTH(NOW())=3),"March", IF(OR(MONTH(NOW())=4,MONTH(NOW())=5,MONTH(NOW())=6),"June",IF(OR(MONTH(NOW())=7,MONTH(NOW())=8,MONTH(NOW())=9),"August","December")))

Is there a simpler way to have done the above formula?

Can you help me figure out how to get cells in column 'B' to display the correct Sundays for the correct month range for the current (NOW) year?

I.E. If A1 displays January then B1 displays first Sunday of January for current year and if A1 displays April then B1 displays first Sunday of April for current year.

Is there a way to have a row added to display a 5th week Sunday that would autohide when there is no 5th week Sunday for the given month for the current year?

Thank you for your help!



Another way you could do it is


Where it says  *3+1  you would change +1 to +2 to get the second month in the quarter and +3 to get the third month in the quarter


will give you the date of the first sunday of the month listed in A1


this will give you the date of the 5th sunday in the month.  You can compare the month of this date to the month you are checking.  If they are the same, then you know this month has a 5th Sunday.  If the month doesn't match, then the month in question does not have a fifth sunday.


[Note:  In A1 it is expecting a month number.  If A1 contains a month name you can get a month number by replacing A1 with   MONTH(DATEVALUE(A1&" 1, "&YEAR(NOW()))).  So you would replace the A1 in each instance above with that formula. ]

However, a formula can not hide a row.  You could put his formula someplace to return a value you can test that indicated whether the row should be used or not.  

=normal formula  would become

=if(indicator cell = True,normal formula,"")

Thus the cell would appear blank when it is not needed.

also, you might check out this site:

the last formula is basically his.  

Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.