How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask David Kirk Your Own Question

David Kirk
David Kirk, Mac Support Specialist
Category: Mac
Satisfied Customers: 311
Experience:  4+ yrs personal use experience, 2+ yrs Mac technical support experience, 13+ yrs desktop experience.
Type Your Mac Question Here...
David Kirk is online now
A new question is answered every 9 seconds

Excel array file

This answer was rated:

Attachment: 2011-10-26_001234_test_calendar2.xls

I am going to upload a calendar file. It has a calendar array in cells B10 through H15. What shows up there is dependent on the "M" and "Y" (Month and Year Values) enter respectively in B3 and C3.What I would like is to have the week preceding and the week following the month indicated by b3 and c3 to show as well in the contiguous cells. So in the case of Jan, 2011, Jan 1st appears in Cell H10 and Jan 31st appears in cell C15. I would like the last 13 days of Dec 2010 to appear in the cells B9 through G10 and the first 12 days of Feb 2011 to appear in the cells d15 through h16. I don't think I can upload from this screen. so I'll have to add it via edit once this is posted. Not letting me upload.

David Kirk :

Welcome to Just Answer.

David Kirk :

You can send me the file by uploading it at Then, copy the link you are given into this page and I'll be able to download it.

David Kirk :

Once I have the file, I'll be able to help you.

David Kirk :

Let me know if you are having trouble uploading the file.


Hi... er... good morning. Sorry I wasn't at my computer last night, so I just saw it after I sauntered into my office (late!!!). Here it is:


As I look at the testcalender2 file, I'm not sure I explain all that I need. When I described the cells that should contain the previous and following months, it was based on a January 2011 calendar. Now look at the calendar if it was august. Just change the "1" in B3 to an "8". In this case, I would want the 8 days preceding August 1st (which is in C10) to be in the cells from B9 through B10. July should begin on thrusday (F14). The target month would always begin on the appropriate day in row 10.

David Kirk :

I believe I have this working. You can download it at Please let me know if it is not what you were looking for. Thanks!

David Kirk :

That one didn't upload properly. Try this link:


DAMN!!! YOU'RE IN THE WILL! Seriously, I'm scratching my head and I'll have to pull apart the changes you made to the array formula to figure out what you did. It's great. Thank you.

David Kirk and 3 other Mac Specialists are ready to help you
Basically, I changed it so the array formula would fill in no matter what for those 5 rows. The other ones just increment based on B10 and H15. I later realized the if statement wasn't actually necessary, so this is the simplified version:

Thanks for the bonus!

The if statement in the original array formula just determined whether it was the current month. If it wasn't the current month, it didn't display any numbers. So, I left the array formula the same, but remove the If statement around it.


I then figured out the top and bottom rows based on the date in the array formula.



"Hi... no real followup needed, but I'd love to have an explanation of the array formula change. Thanks again."