2009年9月5日土曜日

MS VC++ 2008 afxres.hがないことによる、エラーは、MS SDKにあるものをincludeファイルのディレクトリに指定してやればよい。
http://d.hatena.ne.jp/zuzu_sion/20081125/1227680361

2009年3月7日土曜日

excelで前月の最終月曜日を計算する EXCEL fuction calendar and when is the last Monday of every month

EXCELのお勉強を兼ねて、いきなりですが、仕事で使える、EXCELの関数の小技をひとつ。Here's EXCEL function's Tips - when is the last Monday of every month ?

A1=2009(年) A2=3(月)と仮定する。
=DATE(A1,A2,0)-WEEKDAY(DATE(A1,A2,0),3)
で、2月の最終月曜日が求まる。

When the vallue of A1 cell(Year) is "2009" and the value of A2(Month) is "03"
"DATE(A1,A2,0)-WEEKDAY(DATE(A1,A2,0),3)" shows the last Monday of February.

WEEKDAY関数の第2引数に3を指定すると、月曜日からの経過日数がわかる。
その分だけ引けば、月曜日がわかる。

If you specify the second parameter of WEEKDAY "3", you can get how many days from Monday.

さて、この技を何に使うかというと、
この関数をキーにして、日を+1して、7個のセルを作れば、1週間ができる。
さらに、4、5列並べれば、1ケ月のカレンダーになる。

This tips enable for you to make Monthly calendar or simple schedule book.
By making this cell a starting point, Add day +1 till +7 ( Monday to Sunday )
And you can get a week, Add more 4 , 5 times., you'll get a month's calendar, Right?

イメージは、こんな感じ。
[A1]=YEAR
[A2]=MONTH

For example,
[A11]=DATE(A1,A2,0)-WEEKDAY(DATE(A1,A2,0),3)   =A11+1  =A11+2 ・・・=A11+7
{A14]=A11+14 =A14+1 ・・・A14+7

つまり、上記の関数があれば、EXCELで1シートで1ケ月の1週間が月曜日で
始まるの自作カレンダーを作れるンですよ。

By using above the function's tips, you'll get your own calendar which every week starts from Monday with one sheet of EXCEL.

さらに、
In addition,


これで、会社で使う予定表の一丁あがり。
You'll get your own schedule book by EXCEL.