<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ublftbo</author_name>
  <author_url>https://blog.hatena.ne.jp/ublftbo/</author_url>
  <blog_title>Interdisciplinary</blog_title>
  <blog_url>https://interdisciplinary.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>VBAのIIf関数は、3項演算子では無く関数なので、引数にゼロ除算が入ったりすると、エラーが発生します。たとえば、イミディエイトウィンドウで?IIF(True, 1, 1 / 0)とすると、第3引数も評価されて、ゼロ除算の実行時エラー11が出ます。 いっぽう、Excelのワークシート関数であるIF関数は、VBAのIIf関数と同機能ですが、=IF(FALSE, 1/0, 1/1)のようにしても、1が返ります。そこで数式の検証をすると、IF(FALSE,#N/A,1)となっています。関数全体の結果がエラーになるのでは無く、中で第2引数が該当無しエラーと評価され、結果として、意図通りに1が返ります。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finterdisciplinary.hateblo.jp%2Fentry%2F2022%2F10%2F14%2F171652&quot; title=&quot;IIf関数とIF関数 - Interdisciplinary&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-10-14 17:16:52</published>
  <title>IIf関数とIF関数</title>
  <type>rich</type>
  <url>https://interdisciplinary.hateblo.jp/entry/2022/10/14/171652</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
