![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 8
|
How do I get the following formula to display a calendar?
{=if(month(date(d2,b2,1))<>month(date(d2,b2,1)-(weekday(date(d2,b2,1))-1)+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1,"",date(d2,b2,1-(weekday(date(d2,b2,1))-1+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1)} d2 is the year and b2 is the month |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
review John Walkenbach's site.
He has an excellent example. http://j-walk.com/ss/ Advise if this does not help. There are errors in the array formula that you provided; but I did not edit it. Missing brackets and function names. I removed the {} and then entered it with Ctrl-Shift-Enter. [ This Message was edited by: Dave Patton on 2002-03-30 12:03 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
To use Mr. John Walkenbach's formula, - create the named ranges and named formulas - select A2:G6 and Array Enter the formula =IF(MONTH(Startdate)<>MONTH(Startdate-StartDOW+week*7+weekday-1),"",Startdate-StartDOW+week*7+weekday-1) - Number Format custom d |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|