<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Infoment</author_name>
  <author_url>https://blog.hatena.ne.jp/Infoment/</author_url>
  <blog_title>Infomentのブログ ～Excel VBA奮闘記～</blog_title>
  <blog_url>https://infoment.hatenablog.com/</blog_url>
  <categories>
    <anon>Excel</anon>
    <anon>VBA</anon>
    <anon>ユーザー定義関数</anon>
    <anon>失敗談</anon>
  </categories>
  <description>指定日が、指定月の第何週目かを知る必要があった。 そこで、Excel のユーザー定義関数で求めてみることにした。 今日は、２月２７日。なので今日の日付を引数として、戻り値は、何週目かを表す数値にしよう。 色々な方法があると思うが、私はこう考えた。 カウンターを一つ準備する。 カウンターの初期値は、１とする（指定日が日曜日の場合は０）。 指定月一日から１日ずつ加算し、日曜日を通過するたびにカウンターに１を加える。 指定日になった時点のカウンターを、戻り値とする。 例えば２月２７日の場合、 2/3 2/10 2/17 2/24 で、４回日曜日を通過する。従って、今日は第５週目となるはずだ。早速、コ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finfoment.hatenablog.com%2Fentry%2F2019%2F02%2F27%2F221023&quot; title=&quot;今日は、今月の第何週目？ - Infomentのブログ ～Excel VBA奮闘記～&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/I/Infoment/20190227/20190227214326.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-02-27 22:10:23</published>
  <title>今日は、今月の第何週目？</title>
  <type>rich</type>
  <url>https://infoment.hatenablog.com/entry/2019/02/27/221023</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
