{"id":8540,"date":"2025-05-07T08:28:04","date_gmt":"2025-05-06T23:28:04","guid":{"rendered":"https:\/\/extan.jp\/?p=8540"},"modified":"2025-05-07T08:48:13","modified_gmt":"2025-05-06T23:48:13","slug":"%e3%80%90excel-vba%e3%80%91%e6%97%a5%e4%bb%98%e3%82%92%e6%af%94%e8%bc%83%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%ef%bc%81%e6%af%94%e8%bc%83%e5%8f%af%e8%83%bd%e3%81%aa%e6%bc%94%e7%ae%97%e5%ad%90%e3%82%82","status":"publish","type":"post","link":"https:\/\/extan.jp\/?p=8540","title":{"rendered":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01"},"content":{"rendered":"<p>VBA\u3067\u65e5\u4ed8\u306e\u5927\u5c0f\u3084\u4e00\u81f4\u3092\u6761\u4ef6\u306b\u51e6\u7406\u3092\u5206\u3051\u305f\u3044\u3053\u3068\u3001\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n<p>\u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001<\/p>\n<div class=\"kininarukoto1\">\u30fb\u65e5\u4ed8\u540c\u58eb\u3092\u6bd4\u8f03\u3057\u3066\u3082\u3046\u307e\u304f\u5224\u5b9a\u3055\u308c\u306a\u3044<br \/>\n\u30fb\u6587\u5b57\u5217\u3068\u65e5\u4ed8\u578b\u304c\u6df7\u5728\u3057\u3066\u3044\u3066\u30a8\u30e9\u30fc\u306b\u306a\u308b<br \/>\n\u30fb\u65e5\u4ed8\u304c\u540c\u3058\u304b\u3001\u4f55\u65e5\u5f8c\u304b\u3092\u6761\u4ef6\u306b\u3057\u305f\u3044<br \/>\n\u30fb\u55b6\u696d\u65e5\u3092\u7b97\u51fa\u3057\u305f\u3044\u304c\u308f\u304b\u3089\u306a\u3044<\/div>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u304a\u60a9\u307f\u3092\u89e3\u6c7a\u3059\u308b<\/p>\n<div class=\"rdinfo\">\u30fbDate\u578b\u3067\u306e\u6bd4\u8f03\u65b9\u6cd5\u3068\u57fa\u672c\u7684\u306a\u6f14\u7b97\u5b50\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbDateDiff\u95a2\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u67d4\u8edf\u306a\u6761\u4ef6\u5224\u5b9a<br \/>\n\u30fb\u55b6\u696d\u65e5\u3092\u7b97\u51fa\u3059\u308b\u95a2\u6570<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u3082\u304f\u3058<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extan.jp\/?p=8540\/#%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8BVBA%E6%A7%8B%E6%96%87%E3%81%A8%E9%96%A2%E6%95%B0\" >\u4f7f\u7528\u3059\u308bVBA\u69cb\u6587\u3068\u95a2\u6570<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extan.jp\/?p=8540\/#%E6%97%A5%E4%BB%98%E5%9E%8B%E3%81%AE%E6%AF%94%E8%BC%83%E3%81%AB%E4%BD%BF%E3%81%88%E3%82%8B%E6%BC%94%E7%AE%97%E5%AD%90\" >\u65e5\u4ed8\u578b\u306e\u6bd4\u8f03\u306b\u4f7f\u3048\u308b\u6f14\u7b97\u5b50<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extan.jp\/?p=8540\/#2_DateDiff%E9%96%A2%E6%95%B0%E3%81%A7%E5%B7%AE%E3%82%92%E6%AF%94%E8%BC%83\" >2. DateDiff\u95a2\u6570\u3067\u5dee\u3092\u6bd4\u8f03<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=8540\/#%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%88\" >\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/extan.jp\/?p=8540\/#%E6%96%87%E5%AD%97%E5%88%97%E2%86%92%E6%97%A5%E4%BB%98%E5%9E%8B%E3%81%AE%E5%A4%89%E6%8F%9B%EF%BC%88CDate%EF%BC%89\" >\u6587\u5b57\u5217\u2192\u65e5\u4ed8\u578b\u306e\u5909\u63db\uff08CDate\uff09<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/extan.jp\/?p=8540\/#%E5%BF%9C%E7%94%A8%E7%B7%A8%EF%BC%9A%E5%96%B6%E6%A5%AD%E6%97%A5%E3%82%92%E5%8A%A0%E7%AE%97%E3%81%99%E3%82%8B%E9%96%A2%E6%95%B0%E3%82%92%E3%81%A4%E3%81%8F%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B\" >\u5fdc\u7528\u7de8\uff1a\u55b6\u696d\u65e5\u3092\u52a0\u7b97\u3059\u308b\u95a2\u6570\u3092\u3064\u304f\u3063\u3066\u307f\u308b<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/extan.jp\/?p=8540\/#VBA\" >VBA<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/extan.jp\/?p=8540\/#%E8%AA%AC%E6%98%8E\" >\u8aac\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/extan.jp\/?p=8540\/#VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\" >VBA\u306e\u5b9f\u88c5\u624b\u9806<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/extan.jp\/?p=8540\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\" >VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/extan.jp\/?p=8540\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" >\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8BVBA%E6%A7%8B%E6%96%87%E3%81%A8%E9%96%A2%E6%95%B0\"><\/span>\u4f7f\u7528\u3059\u308bVBA\u69cb\u6587\u3068\u95a2\u6570<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u307e\u305a\u306f\u57fa\u672c\u306e\u6bd4\u8f03\u65b9\u6cd5\u306b\u3064\u3044\u3066\u304a\u3055\u3089\u3044\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u3061\u3089\u306b\u8a73\u3057\u304f\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u3051\u308c\u3070\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"dS9YSQ4opT\"><p><a href=\"https:\/\/extan.jp\/?p=7542\">\u3010ExcelVBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\uff01\u6587\u5b57\u5217\u306e\u65e5\u4ed8\u3082\u5bfe\u5fdc\u53ef\uff01<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010ExcelVBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\uff01\u6587\u5b57\u5217\u306e\u65e5\u4ed8\u3082\u5bfe\u5fdc\u53ef\uff01&#8221; &#8212; \u30a8\u30af\u77ed\uff5cExtan.jp\" src=\"https:\/\/extan.jp\/?p=7542&#038;embed=true#?secret=HuRFL9X8sl#?secret=dS9YSQ4opT\" data-secret=\"dS9YSQ4opT\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E6%97%A5%E4%BB%98%E5%9E%8B%E3%81%AE%E6%AF%94%E8%BC%83%E3%81%AB%E4%BD%BF%E3%81%88%E3%82%8B%E6%BC%94%E7%AE%97%E5%AD%90\"><\/span>\u65e5\u4ed8\u578b\u306e\u6bd4\u8f03\u306b\u4f7f\u3048\u308b\u6f14\u7b97\u5b50<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u307e\u305a\u306f\u304b\u3093\u305f\u3093\u306b\u65e5\u4ed8\u578b\u306e\u6bd4\u8f03\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">If \u65e5\u4ed81 = \u65e5\u4ed82 Then\n    &#039; \u7b49\u3057\u3044\u5834\u5408\u306e\u51e6\u7406\nEnd If\n\nIf \u65e5\u4ed81 &gt; \u65e5\u4ed82 Then\n    &#039; \u65e5\u4ed81\u304c\u65e5\u4ed82\u3088\u308a\u5f8c\u306e\u5834\u5408\nEnd If\n\nIf \u65e5\u4ed81 &lt; \u65e5\u4ed82 Then\n    &#039; \u65e5\u4ed81\u304c\u65e5\u4ed82\u3088\u308a\u524d\u306e\u5834\u5408\nEnd If<\/code><\/pre>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u6bd4\u8f03\u6f14\u7b97\u5b50 =, &lt;, &gt;, &lt;=, &gt;=, &lt;&gt; \u306f\u3059\u3079\u3066\u65e5\u4ed8\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<p>\u5177\u4f53\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4>\u7b49\u3057\u3044\u304b\u3069\u3046\u304b\u3092\u6bd4\u8f03\u3059\u308b\uff08=\uff09<\/h4>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">\nDim dt1 As Date\nDim dt2 As Date\n\ndt1 = #5\/7\/2025#    &#039; yyyy\/mm\/dd\u5f62\u5f0f\u3082\u53ef\ndt2 = Date          &#039; \u4eca\u65e5\u306e\u65e5\u4ed8\n\nIf dt1 = dt2 Then\n    MsgBox &quot;\u65e5\u4ed8\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059&quot;\nElse\n    MsgBox &quot;\u65e5\u4ed8\u304c\u7570\u306a\u308a\u307e\u3059&quot;\nEnd If<\/code><\/pre>\n<h4>\u3069\u3061\u3089\u304c\u672a\u6765\u304b\u904e\u53bb\u304b\u3092\u6bd4\u8f03\u3059\u308b\uff08&lt;, &gt;\uff09<\/h4>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim dueDate As Date\ndueDate = #5\/10\/2025#\n\nIf dueDate &gt; Date Then\n    MsgBox &quot;\u307e\u3060\u7de0\u5207\u524d\u3067\u3059&quot;\nElse\n    MsgBox &quot;\u7de0\u5207\u3092\u904e\u304e\u3066\u3044\u307e\u3059&quot;\nEnd If<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"2_DateDiff%E9%96%A2%E6%95%B0%E3%81%A7%E5%B7%AE%E3%82%92%E6%AF%94%E8%BC%83\"><\/span>2. DateDiff\u95a2\u6570\u3067\u5dee\u3092\u6bd4\u8f03<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u6b21\u306fDateDiff\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3001\u5dee\u3092\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\nDateDiff\u306f\u300c\u65e5\u6570\u300d\u300c\u6708\u6570\u300d\u300c\u5e74\u6570\u300d\u306a\u3069\u3092\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u308b\u4fbf\u5229\u306a\u95a2\u6570\u3067\u3059\u3002<br \/>\n\u65e5\u6570\u5358\u4f4d\uff08&#8221;d&#8221;\uff09\u3067\u6bd4\u8f03\u3059\u308b\u3053\u3068\u3067\u3001\u300c\u25cb\u65e5\u7d4c\u904e\u300d\u300c\u25cb\u65e5\u4ee5\u5185\u300d\u306a\u3069\u306e\u6761\u4ef6\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u5e74\u9f62\u8a08\u7b97\u3084\u6709\u52b9\u671f\u9650\u30c1\u30a7\u30c3\u30af\u306b\u3082\u5fdc\u7528\u3067\u304d\u307e\u3059\u3088\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<p>\u69cb\u6587\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">DateDiff(&quot;\u9593\u9694\u5358\u4f4d&quot;, \u65e5\u4ed81, \u65e5\u4ed82)<\/code><\/pre>\n<p><strong>\u9593\u9694\u5358\u4f4d<\/strong><\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 50%;\">\u9593\u9694\u5358\u4f4d<\/td>\n<td style=\"width: 50%;\">\u610f\u5473<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">&#8220;d&#8221;<\/td>\n<td style=\"width: 50%;\">\u65e5\u6570<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">&#8220;m&#8221;<\/td>\n<td style=\"width: 50%;\">\u6708\u6570<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">&#8220;yyyy&#8221;<\/td>\n<td style=\"width: 50%;\">\u5e74\u6570<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">&#8220;ww&#8221;<\/td>\n<td style=\"width: 50%;\">\u9031\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5177\u4f53\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4>2\u3064\u306e\u65e5\u4ed8\u306e\u5dee\u304c7\u65e5\u4ee5\u4e0a\u304b\u5224\u5b9a<\/h4>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">If DateDiff(&quot;d&quot;, Date1, Date2) &gt;= 7 Then\n    MsgBox &quot;1\u9031\u9593\u4ee5\u4e0a\u306e\u5dee\u304c\u3042\u308a\u307e\u3059&quot;\nEnd If<\/code><\/pre>\n<h4>\u30a4\u30d9\u30f3\u30c8\u65e5\u304c\u4eca\u65e5\u304b\u3089\u4f55\u65e5\u524d\u304b\u3092\u5224\u5b9a<\/h4>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim eventDate As Date\neventDate = #4\/30\/2025#\n\nIf DateDiff(&quot;d&quot;, eventDate, Date) &gt; 0 Then\n    MsgBox &quot;\u30a4\u30d9\u30f3\u30c8\u306f &quot; &amp; DateDiff(&quot;d&quot;, eventDate, Date) &amp; &quot; \u65e5\u524d\u306b\u7d42\u4e86\u3057\u307e\u3057\u305f&quot;\nElse\n    MsgBox &quot;\u30a4\u30d9\u30f3\u30c8\u306f\u3053\u308c\u304b\u3089\u3067\u3059&quot;\nEnd If<\/code><\/pre>\n<h4>6\u304b\u6708\u4ee5\u4e0a\u524d\u306e\u30c7\u30fc\u30bf\u3092\u62bd\u51fa<\/h4>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim lastUpdate As Date\nlastUpdate = #10\/1\/2024#\n\nIf DateDiff(&quot;m&quot;, lastUpdate, Date) &gt;= 6 Then\n    MsgBox &quot;\u3053\u306e\u30c7\u30fc\u30bf\u306f6\u304b\u6708\u4ee5\u4e0a\u524d\u3067\u3059&quot;\nEnd If<\/code><\/pre>\n<h4>\u5e74\u9f62\u306e\u8a08\u7b97<\/h4>\n<p>\u5e74\u9f62\u306e\u8a08\u7b97\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim birthDate As Date\nDim age As Integer\n\nbirthDate = #1990\/5\/1#\nage = DateDiff(&quot;yyyy&quot;, birthDate, Date)\n\n&#039; \u8a95\u751f\u65e5\u304c\u307e\u3060\u6765\u3066\u3044\u306a\u3044\u5e74\u306f1\u6b73\u6e1b\u3089\u3059\nIf Date &lt; DateSerial(Year(Date), Month(birthDate), Day(birthDate)) Then\n    age = age - 1\nEnd If\n\nMsgBox &quot;\u73fe\u5728\u306e\u5e74\u9f62\u306f &quot; &amp; age &amp; &quot; \u6b73\u3067\u3059&quot;<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%88\"><\/span>\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"%E6%96%87%E5%AD%97%E5%88%97%E2%86%92%E6%97%A5%E4%BB%98%E5%9E%8B%E3%81%AE%E5%A4%89%E6%8F%9B%EF%BC%88CDate%EF%BC%89\"><\/span>\u6587\u5b57\u5217\u2192\u65e5\u4ed8\u578b\u306e\u5909\u63db\uff08CDate\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3088\u304f\u3042\u308b\u5143\u30bd\u30fc\u30b9\u304c\u6587\u5b57\u5217\u3067\u3001\u65e5\u4ed8\u3068\u3057\u3066\u8a8d\u8b58\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3088\u306d\u3002<br \/>\n\u305d\u306e\u5834\u5408\u306f\u6587\u5b57\u5217\u3092\u65e5\u4ed8\u578b\u306b\u5909\u63db\u3057\u3066\u304b\u3089\u3001\u6bd4\u8f03\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim dt As Date\ndt = CDate(&quot;2025\/05\/07&quot;)<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%E5%BF%9C%E7%94%A8%E7%B7%A8%EF%BC%9A%E5%96%B6%E6%A5%AD%E6%97%A5%E3%82%92%E5%8A%A0%E7%AE%97%E3%81%99%E3%82%8B%E9%96%A2%E6%95%B0%E3%82%92%E3%81%A4%E3%81%8F%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B\"><\/span>\u5fdc\u7528\u7de8\uff1a\u55b6\u696d\u65e5\u3092\u52a0\u7b97\u3059\u308b\u95a2\u6570\u3092\u3064\u304f\u3063\u3066\u307f\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5fdc\u7528\u7de8\u3068\u3057\u3066\u3001\u55b6\u696d\u65e5\u3092\u52a0\u7b97\u3059\u308b\u95a2\u6570\u3092\u3064\u304f\u308a\u30015\u55b6\u696d\u65e5\u5f8c\u306a\u3069\u5224\u5b9a\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ed5\u69d8\u3068\u3057\u3066\u306f\u3001\u571f\u65e5\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u6708\u301c\u91d1\u306e\u307f\u3092\u30ab\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u306a\u304a\u3001\u571f\u65e5\u4ee5\u5916\u306e\u795d\u65e5\u3092\u8003\u616e\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u3055\u3089\u306b\u795d\u65e5\u30ea\u30b9\u30c8\u3092\u7528\u610f\u3057\u3001\u9664\u5916\u51e6\u7406\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h3><span class=\"ez-toc-section\" id=\"VBA\"><\/span>VBA<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>VBA\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Function AddBusinessDays(startDate As Date, businessDays As Long) As Date\n    Dim count As Long\n    Dim tempDate As Date\n    \n    tempDate = startDate\n    count = 0\n    \n    Do While count &lt; businessDays\n        tempDate = tempDate + 1\n        &#039; \u571f\u65e5\u3092\u9664\u304f\n        If Weekday(tempDate, vbMonday) &lt;= 5 Then\n            count = count + 1\n        End If\n    Loop\n    \n    AddBusinessDays = tempDate\nEnd Function<\/code><\/pre>\n<p>\u4eca\u65e5\u304b\u30895\u55b6\u696d\u65e5\u5f8c\u3092\u8868\u793a\u3055\u305b\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub ShowBusinessDate()\n    Dim resultDate As Date\n    resultDate = AddBusinessDays(Date, 5)\n    MsgBox &quot;5\u55b6\u696d\u65e5\u5f8c\u306f &quot; &amp; Format(resultDate, &quot;yyyy\/mm\/dd&quot;)\nEnd Sub<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E8%AA%AC%E6%98%8E\"><\/span>\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"info\"><code>Function AddBusinessDays(startDate As Date, businessDays As Long) As Date<\/code><\/div>\n<p>\u306f\u3001startDate\u304b\u3089businessDays\u65e5\u5206\u306e\u55b6\u696d\u65e5\u3092\u52a0\u7b97\u3057\u3001\u6700\u7d42\u65e5\u306e\u65e5\u4ed8\u3092\u8fd4\u3059\u95a2\u6570\u3067\u3059\u3002<\/p>\n<div class=\"info\"><code>tempDate = startDate<\/code><\/div>\n<p>\u958b\u59cb\u65e5\u304b\u3089\u8a08\u7b97\u3092\u59cb\u3081\u308b\u305f\u3081\u306b\u3001tempDate\u3092startDate\u3067\u521d\u671f\u5316\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>count = 0<\/code><\/div>\n<p>\u55b6\u696d\u65e5\u52a0\u7b97\u306e\u30ab\u30a6\u30f3\u30bf\u30fc\u30920\u306b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>Do While count &lt; businessDays<\/code><\/div>\n<p>\u5fc5\u8981\u306a\u55b6\u696d\u65e5\u6570\u306b\u9054\u3059\u308b\u307e\u3067\u30eb\u30fc\u30d7\u3092\u7d9a\u3051\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>tempDate = tempDate + 1\t<\/code><\/div>\n<p>\u65e5\u4ed8\u30921\u65e5\u9032\u3081\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>If Weekday(tempDate, vbMonday) &lt;= 5 Then<\/code><\/div>\n<p>Weekday\u95a2\u6570\u3067\u66dc\u65e5\u3092\u53d6\u5f97\u3057\u3001\u6708\uff5e\u91d1\uff081\uff5e5\uff09\u306a\u3089\u55b6\u696d\u65e5\u3068\u3057\u3066\u30ab\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002<br \/>\nvbMonday\u3067\u9031\u306e\u59cb\u307e\u308a\u3092\u6708\u66dc\uff081\uff09\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>count = count + 1<\/code><\/div>\n<p>\u55b6\u696d\u65e5\u3060\u3063\u305f\u5834\u5408\u306b\u30ab\u30a6\u30f3\u30bf\u30fc\u30921\u5897\u3084\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>AddBusinessDays = tempDate<\/code><\/div>\n<p>\u6700\u7d42\u7684\u306b\u5230\u9054\u3057\u305f\u55b6\u696d\u65e5\u3092\u95a2\u6570\u306e\u8fd4\u308a\u5024\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\"><\/span>VBA\u306e\u5b9f\u88c5\u624b\u9806<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5b9f\u88c5\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>Excel\u5074\u306bVBA\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u2460Excel\u3092\u65b0\u898f\u306b\u958b\u304d\u3001\u300c\u958b\u767a\u300d\u30bf\u30d6\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300cVisualBasic\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br \/>\n\u3082\u3057\u304f\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u300cAlt\u300d\uff0b\u300cF11\u300d\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<p>\u2461\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u5de6\u30da\u30a4\u30f3\u306eVBAProject\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u633f\u5165\u300d\u3001\u300c\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<img decoding=\"async\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/05\/050919_1542_VBAFunctio2.png\" alt=\"\" \/>\n<p>\u2462\u53f3\u30da\u30a4\u30f3\u306e\u30a6\u30a4\u30f3\u30c9\u30a6\u306b\u4e0a\u8a18\u306eVBA\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1680\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/09\/092219_1211_temp22.png\" alt=\"\" width=\"1395\" height=\"879\" \/><\/p>\n<p>\u3053\u3061\u3089\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3067\u306f\u65e9\u901fVBA\u306e\u5b9f\u884c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u2460\u300c\u958b\u767a\u300d\u30bf\u30d6\u306e\u300cVBA\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u5b9f\u884c\u3057\u305f\u3044\u30de\u30af\u30ed\u3092\u9078\u629e\u3057\u3001\u300c<strong>\u5b9f\u884c<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u2461\u51e6\u7406\u304c\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\"><\/span>\u3055\u3044\u3054\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<\/p>\n<div class=\"endinfo\">\u30fbDate\u578b\u3067\u306e\u6bd4\u8f03\u65b9\u6cd5\u3068\u57fa\u672c\u7684\u306a\u6f14\u7b97\u5b50\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbDateDiff\u95a2\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u67d4\u8edf\u306a\u6761\u4ef6\u5224\u5b9a<br \/>\n\u30fb\u55b6\u696d\u65e5\u3092\u7b97\u51fa\u3059\u308b\u95a2\u6570<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>VBA\u3067\u65e5\u4ed8\u3092\u6b63\u3057\u304f\u6bd4\u8f03\u3067\u304d\u308c\u3070\u3001\u696d\u52d9\u306e\u81ea\u52d5\u5316\u30fb\u901a\u77e5\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u7ba1\u7406\u306a\u3069\u3001\u3042\u3089\u3086\u308b\u5834\u9762\u3067\u5229\u7528\u3067\u304d\u307e\u3059\u306e\u3067\u3001<br \/>\n\u305c\u3072\u3001\u7528\u9014\u306b\u5fdc\u3058\u3066\u6f14\u7b97\u5b50\u3084\u95a2\u6570\u3092\u4f7f\u3044\u3053\u306a\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u3067\u65e5\u4ed8\u306e\u5927\u5c0f\u3084\u4e00\u81f4\u3092\u6761\u4ef6\u306b\u51e6\u7406\u3092\u5206\u3051\u305f\u3044\u3053\u3068\u3001\u3042\u308a\u307e\u305b\u3093\u304b\uff1f \u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001 \u30fb\u65e5\u4ed8\u540c\u58eb\u3092\u6bd4\u8f03\u3057\u3066\u3082\u3046\u307e\u304f\u5224\u5b9a\u3055\u308c\u306a\u3044 \u30fb\u6587\u5b57\u5217\u3068\u65e5\u4ed8\u578b\u304c\u6df7\u5728\u3057\u3066\u3044\u3066\u30a8\u30e9\u30fc\u306b\u306a\u308b \u30fb\u65e5\u4ed8\u304c\u540c\u3058\u304b\u3001\u4f55\u65e5\u5f8c\u304b\u3092\u6761\u4ef6\u306b\u3057\u305f&#8230;<\/p>\n","protected":false},"author":1,"featured_media":14497,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[64],"class_list":{"0":"post-8540","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-excelvba","8":"tag-64","9":"article cf"},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\"\/>\n\t<meta name=\"keywords\" content=\"\u65e5\u4ed8\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=8540\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=8540\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-05-06T23:28:04+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-05-06T23:48:13+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#article\",\"name\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01 | \\u30a8\\u30af\\u77ed\\uff5cExtan.jp\",\"headline\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01\",\"author\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/extan.jp\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/str-236-1.png\",\"width\":815,\"height\":406,\"caption\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01\"},\"datePublished\":\"2025-05-07T08:28:04+09:00\",\"dateModified\":\"2025-05-07T08:48:13+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#webpage\"},\"articleSection\":\"Excel VBA, \\u65e5\\u4ed8\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/extan.jp\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"name\":\"Microsoft 365\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"position\":2,\"name\":\"Microsoft 365\",\"item\":\"https:\\\/\\\/extan.jp\\\/?cat=47\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=17#listItem\",\"name\":\"Excel\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=17#listItem\",\"position\":3,\"name\":\"Excel\",\"item\":\"https:\\\/\\\/extan.jp\\\/?cat=17\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=6#listItem\",\"name\":\"Excel VBA\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=47#listItem\",\"name\":\"Microsoft 365\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=6#listItem\",\"position\":4,\"name\":\"Excel VBA\",\"item\":\"https:\\\/\\\/extan.jp\\\/?cat=6\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#listItem\",\"name\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=17#listItem\",\"name\":\"Excel\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#listItem\",\"position\":5,\"name\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?cat=6#listItem\",\"name\":\"Excel VBA\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\",\"name\":\"\\u30a8\\u30af\\u77ed\\uff5cExtan.jp\",\"description\":\"\\u50cd\\u304f\\u4eba\\u306e\\u81ea\\u7531\\u6642\\u9593\\u3092\\u3064\\u304f\\u308b\",\"url\":\"https:\\\/\\\/extan.jp\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\",\"url\":\"https:\\\/\\\/extan.jp\\\/?author=1\",\"name\":\"\\u30bf\\u30ab\\u30d2\\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"\\u30bf\\u30ab\\u30d2\\u30ed@extan\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#webpage\",\"url\":\"https:\\\/\\\/extan.jp\\\/?p=8540\",\"name\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01 | \\u30a8\\u30af\\u77ed\\uff5cExtan.jp\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?author=1#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/extan.jp\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/str-236-1.png\",\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540\\\/#mainImage\",\"width\":815,\"height\":406,\"caption\":\"\\u3010Excel VBA\\u3011\\u65e5\\u4ed8\\u3092\\u6bd4\\u8f03\\u3059\\u308b\\u65b9\\u6cd5\\u5fdc\\u7528\\u7de8\\uff01\\u55b6\\u696d\\u65e5\\u7b97\\u51fa\\u95a2\\u6570\\u3082\\uff01\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/?p=8540#mainImage\"},\"datePublished\":\"2025-05-07T08:28:04+09:00\",\"dateModified\":\"2025-05-07T08:48:13+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/extan.jp\\\/#website\",\"url\":\"https:\\\/\\\/extan.jp\\\/\",\"name\":\"\\u30a8\\u30af\\u77ed\\uff5cExtan.jp\",\"description\":\"\\u50cd\\u304f\\u4eba\\u306e\\u81ea\\u7531\\u6642\\u9593\\u3092\\u3064\\u304f\\u308b\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/extan.jp\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp","description":"","canonical_url":"https:\/\/extan.jp\/?p=8540","robots":"max-image-preview:large","keywords":"\u65e5\u4ed8","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/extan.jp\/?p=8540#article","name":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp","headline":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01","author":{"@id":"https:\/\/extan.jp\/?author=1#author"},"publisher":{"@id":"https:\/\/extan.jp\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/extan.jp\/wp-content\/uploads\/2025\/05\/str-236-1.png","width":815,"height":406,"caption":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01"},"datePublished":"2025-05-07T08:28:04+09:00","dateModified":"2025-05-07T08:48:13+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/extan.jp\/?p=8540#webpage"},"isPartOf":{"@id":"https:\/\/extan.jp\/?p=8540#webpage"},"articleSection":"Excel VBA, \u65e5\u4ed8"},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=8540#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/extan.jp#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","name":"Microsoft 365"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","position":2,"name":"Microsoft 365","item":"https:\/\/extan.jp\/?cat=47","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=17#listItem","name":"Excel"},"previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=17#listItem","position":3,"name":"Excel","item":"https:\/\/extan.jp\/?cat=17","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=6#listItem","name":"Excel VBA"},"previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=47#listItem","name":"Microsoft 365"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=6#listItem","position":4,"name":"Excel VBA","item":"https:\/\/extan.jp\/?cat=6","nextItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?p=8540#listItem","name":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01"},"previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=17#listItem","name":"Excel"}},{"@type":"ListItem","@id":"https:\/\/extan.jp\/?p=8540#listItem","position":5,"name":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01","previousItem":{"@type":"ListItem","@id":"https:\/\/extan.jp\/?cat=6#listItem","name":"Excel VBA"}}]},{"@type":"Organization","@id":"https:\/\/extan.jp\/#organization","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","url":"https:\/\/extan.jp\/"},{"@type":"Person","@id":"https:\/\/extan.jp\/?author=1#author","url":"https:\/\/extan.jp\/?author=1","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=8540#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","width":96,"height":96,"caption":"\u30bf\u30ab\u30d2\u30ed@extan"}},{"@type":"WebPage","@id":"https:\/\/extan.jp\/?p=8540#webpage","url":"https:\/\/extan.jp\/?p=8540","name":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp","inLanguage":"ja","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"breadcrumb":{"@id":"https:\/\/extan.jp\/?p=8540#breadcrumblist"},"author":{"@id":"https:\/\/extan.jp\/?author=1#author"},"creator":{"@id":"https:\/\/extan.jp\/?author=1#author"},"image":{"@type":"ImageObject","url":"https:\/\/extan.jp\/wp-content\/uploads\/2025\/05\/str-236-1.png","@id":"https:\/\/extan.jp\/?p=8540\/#mainImage","width":815,"height":406,"caption":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=8540#mainImage"},"datePublished":"2025-05-07T08:28:04+09:00","dateModified":"2025-05-07T08:48:13+09:00"},{"@type":"WebSite","@id":"https:\/\/extan.jp\/#website","url":"https:\/\/extan.jp\/","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","inLanguage":"ja","publisher":{"@id":"https:\/\/extan.jp\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"\u30a8\u30af\u77ed\uff5cExtan.jp","og:type":"article","og:title":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp","og:url":"https:\/\/extan.jp\/?p=8540","article:published_time":"2025-05-06T23:28:04+00:00","article:modified_time":"2025-05-06T23:48:13+00:00","twitter:card":"summary","twitter:title":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01 | \u30a8\u30af\u77ed\uff5cExtan.jp"},"aioseo_meta_data":{"post_id":"8540","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2026-06-24 15:27:45","updated":"2026-06-24 15:27:45","primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\" title=\"\u30db\u30fc\u30e0\">\u30db\u30fc\u30e0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\/?cat=47\" title=\"Microsoft 365\">Microsoft 365<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\/?cat=17\" title=\"Excel\">Excel<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/extan.jp\/?cat=6\" title=\"Excel VBA\">Excel VBA<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u30db\u30fc\u30e0","link":"https:\/\/extan.jp"},{"label":"Microsoft 365","link":"https:\/\/extan.jp\/?cat=47"},{"label":"Excel","link":"https:\/\/extan.jp\/?cat=17"},{"label":"Excel VBA","link":"https:\/\/extan.jp\/?cat=6"},{"label":"\u3010Excel VBA\u3011\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u5fdc\u7528\u7de8\uff01\u55b6\u696d\u65e5\u7b97\u51fa\u95a2\u6570\u3082\uff01","link":"https:\/\/extan.jp\/?p=8540"}],"_links":{"self":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/8540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8540"}],"version-history":[{"count":16,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/8540\/revisions"}],"predecessor-version":[{"id":14499,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/8540\/revisions\/14499"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/media\/14497"}],"wp:attachment":[{"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}