Question:

Modifying existing Calendar formula for Excel?

by  |  earlier

0 LIKES UnLike

How do i change the excel formula from: http://www.slackermanager.com/2005/04/make_a_calendar.html to display next month's calendar?

 Tags:

   Report

1 ANSWERS


  1. try this...

    =IF(MONTH(DATE(YEAR(NOW()), MONTH(NOW())+1,1)+1)<> MONTH(DATE( YEAR(NOW()), MONTH( NOW())+1, 1)- (WEEKDAY (DATE( YEAR(NOW()),  MONTH(NOW())+1, 1))-1)+{0;1;2;3;4;5}*7 + {1,2,3,4,5,6,7}-1),"", DATE( YEAR(NOW()), MONTH(NOW())+1,1)- (WEEKDAY(DATE(YEAR (NOW()), MONTH(NOW())+1,1))-1) + {0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1)

    note: I had to put some spaces "  " in the formula to get Yahoo Answers to display it without cutting parts of it off.  You may need to remove the spaces after you've pasted it in your cell.

    you'll notice that all I did to modify this formula for the next month was to add a "+1" after the MONTH(NOW()) formulas  (ie: make them MONTH(NOW())+1.

    you can change those to +2 to get 2 months into the future, +3 for 3 months into the future, etc.

    below you can see where I added the +1  [see "added +1 here" comments]

    =IF(MONTH(DATE(YEAR(NOW()), MONTH(NOW())+1,1)+1[added +1 here])<>

    MONTH(DATE( YEAR(NOW()), MONTH( NOW())+1 [added +1 here],

    1)- (WEEKDAY (DATE( YEAR(NOW()),  MONTH(NOW())+1 [added +1 here],

    1))-1)+{0;1;2;3;4;5}*7 + {1,2,3,4,5,6,7}-1),"", DATE( YEAR(NOW()), MONTH(NOW())+1 [added +1 here]

    ,1)- (WEEKDAY(DATE(YEAR (NOW()), MONTH(NOW())+1 [added +1 here]

    ,1))-1) + {0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1)

    --------edit-------

    PS: by the way....very cool formula.  I'll have to keep this one around.  Thanks!!! :-))))

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.