{"id":14989,"date":"2026-07-10T06:18:34","date_gmt":"2026-07-09T21:18:34","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=14989"},"modified":"2026-07-10T06:18:35","modified_gmt":"2026-07-09T21:18:35","slug":"cc-vba-date-handling","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-date-handling\/","title":{"rendered":"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA\u65e5\u4ed8\u306e\u53d6\u5f97\u30fb\u66f8\u5f0f\u5909\u63db\u30fb\u6bd4\u8f03\u30fb\u8a08\u7b97\u3092\u5b8c\u5168\u89e3\u8aac\uff01\u696d\u52d9\u81ea\u52d5\u5316\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u65b9\u3082\u7d39\u4ecb"},"content":{"rendered":"\n<style>\n.g-flow-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}\n.g-flow-item{background:linear-gradient(135deg,#1a1a1a,#2a1015);color:#fff;border-radius:8px;padding:16px 14px;min-width:130px;flex:1;text-align:center;}\n.g-flow-arrow{color:#dc2626;font-size:20px;font-weight:700;}\n.g-card-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 32px;}\n.g-card-row>div{flex:1;min-width:220px;}\n@media(max-width:600px){\n  .g-flow-row{flex-direction:column;}\n  .g-flow-arrow{transform:rotate(90deg);}\n  .g-card-row{flex-direction:column;}\n  .g-card-row>div{min-width:100%;}\n}\n<\/style>\n\n\n\n<div style=\"margin:0 0 32px;\">\n  <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/07\/thumb-cc-vba-date-handling-6.jpg\" alt=\"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA\u65e5\u4ed8\u306e\u53d6\u5f97\u30fb\u66f8\u5f0f\u5909\u63db\u30fb\u6bd4\u8f03\u30fb\u8a08\u7b97\u3092\u5b8c\u5168\u89e3\u8aac\uff01\u696d\u52d9\u81ea\u52d5\u5316\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u65b9\u3082\u7d39\u4ecb\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-radius:12px;padding:24px 28px;margin:0 0 32px;border-left:4px solid #dc2626;\">\n  <p style=\"font-size:15px;font-weight:700;color:#1a1a1a;margin:0 0 16px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9<\/p>\n  <ol style=\"margin:0;padding-left:20px;font-size:14px;line-height:2.2;list-style:none;\">\n    <li><a href=\"#sec-01\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">01<\/span>VBA\u306eDate\u578b\u3068\u306f\uff1f\u57fa\u790e\u77e5\u8b58<\/a><\/li>\n    <li><a href=\"#sec-02\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">02<\/span>\u4eca\u65e5\u306e\u65e5\u4ed8\u30fb\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/a><\/li>\n    <li><a href=\"#sec-03\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">03<\/span>Format\u95a2\u6570\u3067\u65e5\u4ed8\u3092\u66f8\u5f0f\u5909\u63db\u3059\u308b<\/a><\/li>\n    <li><a href=\"#sec-04\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">04<\/span>\u65e5\u4ed8\u306e\u6bd4\u8f03\u30fb\u5927\u5c0f\u5224\u5b9a<\/a><\/li>\n    <li><a href=\"#sec-05\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">05<\/span>DateAdd\u30fbDateDiff\u95a2\u6570\u3067\u65e5\u4ed8\u8a08\u7b97<\/a><\/li>\n    <li><a href=\"#sec-06\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">06<\/span>IsDate\u30fbCDate\u95a2\u6570\u3067\u5b89\u5168\u306b\u5909\u63db\u3059\u308b<\/a><\/li>\n    <li><a href=\"#sec-07\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">07<\/span>Claude Code\u3067VBA\u30de\u30af\u30ed\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/a><\/li>\n    <li><a href=\"#faq\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">FAQ<\/span>\u3088\u304f\u3042\u308b\u8cea\u554f<\/a><\/li>\n  <\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cVBA\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\u3057\u305f\u3044\u300d\u300c\u65e5\u4ed8\u3092\u7279\u5b9a\u306e\u66f8\u5f0f\u306b\u5909\u63db\u3057\u305f\u3044\u300d\u300c2\u3064\u306e\u65e5\u4ed8\u306e\u5dee\uff08\u7d4c\u904e\u65e5\u6570\uff09\u3092\u8a08\u7b97\u3057\u305f\u3044\u300d\u2014\u2014Excel\u306eVBA\u30de\u30af\u30ed\u3067\u65e5\u4ed8\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001Date\u578b\u306e\u6271\u3044\u65b9\u30fbFormat\u95a2\u6570\u306e\u66f8\u304d\u65b9\u30fbDateAdd\/DateDiff\u95a2\u6570\u306e\u5f15\u6570\u306a\u3069\u3001\u899a\u3048\u308b\u3053\u3068\u304c\u591a\u304f\u3066\u6238\u60d1\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u672c\u8a18\u4e8b\u3067\u306f<strong>VBA\u3067\u65e5\u4ed8\u3092\u6271\u3046\u969b\u306e\u5168\u77e5\u8b58<\/strong>\u3092\u3001\u8c4a\u5bcc\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u5b8c\u5168\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f8c\u534a\u3067\u306f\u3001<strong>Claude Code\u306bVBA\u30de\u30af\u30ed\u306e\u65e5\u4ed8\u51e6\u7406\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u81ea\u52d5\u751f\u6210\u3057\u3066\u3082\u3089\u3046\u65b9\u6cd5<\/strong>\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002\u300cVBA\u306e\u66f8\u304d\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u300d\u300c\u6bce\u56de\u30cd\u30c3\u30c8\u691c\u7d22\u3057\u3066\u6642\u9593\u3092\u3068\u3089\u308c\u308b\u300d\u3068\u3044\u3046\u65b9\u306f\u3001AI\u6d3b\u7528\u3067\u696d\u52d9\u52b9\u7387\u3092\u5927\u5e45\u6539\u5584\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">VBA\u306e\u65e5\u4ed8\u51e6\u7406\u306f\u300c\u30b7\u30ea\u30a2\u30eb\u5024\u300d\u3068\u3044\u3046\u72ec\u7279\u306e\u6982\u5ff5\u304c\u3042\u308b\u305f\u3081\u3001\u6700\u521d\u306f\u308f\u304b\u308a\u306b\u304f\u3044\u3067\u3059\u3002\u3057\u304b\u3057\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3059\u308b\u3068\u3001\u65e5\u4ed8\u306e\u52a0\u6e1b\u7b97\u30fb\u66f8\u5f0f\u5909\u63db\u30fb\u6bd4\u8f03\u304c\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u672c\u8a18\u4e8b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u30b3\u30d4\u30fc\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3057\u3066\u3044\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u7279\u306b\u300c\u65e5\u4ed8\u306e\u6bd4\u8f03\u300d\u3068\u300c\u6708\u672b\u65e5\u306e\u8a08\u7b97\u300d\u306fVBA\u696d\u52d9\u3067\u3088\u304f\u4f7f\u3046\u306e\u306b\u9593\u9055\u3048\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u7d4c\u8cbb\u7cbe\u7b97\u30fb\u52e4\u6020\u7ba1\u7406\u30fb\u8acb\u6c42\u66f8\u4f5c\u6210\u306a\u3069\u65e5\u4ed8\u304c\u91cd\u8981\u306a\u696d\u52d9\u30de\u30af\u30ed\u3092\u81ea\u4fe1\u3092\u6301\u3063\u3066\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>VBA\u306eDate\u578b\u3068\u30b7\u30ea\u30a2\u30eb\u5024\u306e\u4ed5\u7d44\u307f<\/strong>\u304c\u7406\u89e3\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Date\u30fbTime\u30fbNow\u95a2\u6570<\/strong>\u3067\u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u3092\u53d6\u5f97\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Format\u95a2\u6570<\/strong>\u3067\u65e5\u4ed8\u3092\u4efb\u610f\u306e\u66f8\u5f0f\uff08yyyy\/mm\/dd\u7b49\uff09\u306b\u5909\u63db\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>DateAdd\u30fbDateDiff\u95a2\u6570<\/strong>\u3067\u65e5\u4ed8\u306e\u52a0\u6e1b\u7b97\u30fb\u671f\u9593\u8a08\u7b97\u304c\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>IsDate\u30fbCDate\u95a2\u6570<\/strong>\u3067\u5b89\u5168\u306a\u578b\u5909\u63db\u3068\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Claude Code\u3092\u4f7f\u3063\u305f\u65e5\u4ed8\u30de\u30af\u30ed\u306e\u81ea\u52d5\u751f\u6210\u65b9\u6cd5<\/strong>\u304c\u308f\u304b\u308b<\/span><\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-01\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">01<\/span>\n  <span class=\"section-label\" style=\"display:block;\">BASICS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">VBA\u306eDate\u578b\u3068\u306f\uff1f\u57fa\u790e\u77e5\u8b58<\/span>\n  <span class=\"section-desc\">\u30b7\u30ea\u30a2\u30eb\u5024\u30fbDate\u578b\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\u65b9\u6cd5<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eDate\u578b\u306f\u65e5\u4ed8\u3068\u6642\u523b\u3092\u683c\u7d0d\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002\u5185\u90e8\u7684\u306b\u306f\u300c\u30b7\u30ea\u30a2\u30eb\u5024\u300d\u3068\u547c\u3070\u308c\u308b\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\uff08Double\uff09\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6574\u6570\u90e8\u304c\u65e5\u4ed8\uff081900\u5e741\u67080\u65e5\u304b\u3089\u306e\u7d4c\u904e\u65e5\u6570\uff09\u3092\u3001\u5c0f\u6570\u90e8\u304c\u6642\u523b\uff081\u65e5\u30921.0\u3068\u3057\u3066\uff09\u3092\u8868\u3057\u307e\u3059\u3002Date\u578b\u306e\u53d6\u308c\u308b\u7bc4\u56f2\u306f\u897f\u66a6100\u5e741\u67081\u65e5\u301c\u897f\u66a69999\u5e7412\u670831\u65e5\u307e\u3067\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u30b7\u30ea\u30a2\u30eb\u5024\uff08Serial Value\uff09<\/strong>\uff1aExcel\u304a\u3088\u3073\u305d\u308c\u3092\u571f\u53f0\u3068\u3059\u308bVBA\u304c\u65e5\u4ed8\u30fb\u6642\u523b\u3092\u5185\u90e8\u3067\u7ba1\u7406\u3059\u308b\u6570\u5024\u5f62\u5f0f\u30021900\u5e741\u67081\u65e5\u3092\u300c1\u300d\u3068\u3057\u3066\u3001\u305d\u308c\u4ee5\u964d\u306e\u65e5\u4ed8\u306f1\u65e5\u3054\u3068\u306b1\u52a0\u7b97\u3057\u305f\u6574\u6570\u3067\u8868\u3059\u3002\u4f8b\u3048\u30702024\u5e741\u67081\u65e5\u306f\u30b7\u30ea\u30a2\u30eb\u5024\u300c45292\u300d\u3002\u6642\u523b\u306f1\u65e5\u30921.0\u3068\u3057\u3066\u300112:00\uff08\u6b63\u5348\uff09\u306f0.5\u300118:00\u306f0.75\u3068\u3057\u3066\u5c0f\u6570\u3067\u8868\u73fe\u3059\u308b\u3002\u3053\u306e\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3059\u308b\u3068\u3001\u65e5\u4ed8\u306e\u52a0\u6e1b\u7b97\u304c\u5358\u7d14\u306a\u8db3\u3057\u7b97\u30fb\u5f15\u304d\u7b97\u3067\u5b9f\u88c5\u3067\u304d\u308b\u7406\u7531\u304c\u5206\u304b\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' Date\u578b\u5909\u6570\u306e\u5ba3\u8a00\u3068\u4ee3\u5165\nDim d1 As Date\nDim d2 As Date\n\n' \u65e5\u4ed8\u30ea\u30c6\u30e9\u30eb\u306f # \u3067\u56f2\u3080\nd1 = #2024\/01\/15#\n\n' \u6587\u5b57\u5217\u304b\u3089\u81ea\u52d5\u5909\u63db\uff08\u65e5\u672c\u8a9e\u74b0\u5883\u3067\u306f \"yyyy\/mm\/dd\" \u5f62\u5f0f\uff09\nd2 = \"2024\/03\/31\"\n\n' \u30b7\u30ea\u30a2\u30eb\u5024\u3092\u78ba\u8a8d\u3059\u308b\nDebug.Print CDbl(d1)    ' 45306 \u306e\u3088\u3046\u306a\u6574\u6570\u5024\nDebug.Print CDbl(d2)    ' 45381 \u306e\u3088\u3046\u306a\u6574\u6570\u5024\n\n' \u30b7\u30ea\u30a2\u30eb\u5024\u304b\u3089\u65e5\u4ed8\u3092\u53d6\u5f97\nDim serialVal As Long\nserialVal = 45292\nDim dateFromSerial As Date\ndateFromSerial = CDate(serialVal)\nDebug.Print dateFromSerial    ' 2024\/01\/01<\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Date\u578b\u5909\u6570\u306b\u5024\u3092\u4ee3\u5165\u3059\u308b\u65b9\u6cd5\u306f3\u3064\u3042\u308a\u307e\u3059\u3002\u2460<strong>\u65e5\u4ed8\u30ea\u30c6\u30e9\u30eb<\/strong>\uff08`#2024\/01\/15#`\u306e\u3088\u3046\u306b`#`\u3067\u56f2\u3080\uff09\u3001\u2461<strong>\u6587\u5b57\u5217\u304b\u3089\u306e\u81ea\u52d5\u5909\u63db<\/strong>\uff08`\"2024\/01\/15\"`\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u4ee3\u5165\u3059\u308b\u3068\u81ea\u52d5\u7684\u306bDate\u578b\u306b\u5909\u63db\u3055\u308c\u308b\uff09\u3001\u2462<strong>Date\u95a2\u6570\u30fbNow\u95a2\u6570<\/strong>\u304b\u3089\u306e\u4ee3\u5165\uff08\u5f8c\u8ff0\uff09\u3002\u65e5\u4ed8\u30ea\u30c6\u30e9\u30eb\u306fVBA\u304c\u89e3\u91c8\u3059\u308b\u969b\u306b\u6708\/\u65e5\u306e\u9806\uff08\u7c73\u56fd\u5f62\u5f0f\uff09\u3067\u51e6\u7406\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001\u5b9f\u52d9\u3067\u306f\u6587\u5b57\u5217\u5909\u63db\u307e\u305f\u306f\u65e5\u4ed8\u95a2\u6570\u3092\u4f7f\u3046\u65b9\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\">\u65e5\u4ed8\u6587\u5b57\u5217<br>\u5165\u529b<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">IsDate()\u3067<br>\u691c\u8a3c<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">CDate()\u3067<br>\u578b\u5909\u63db<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">Date\u578b\u5909\u6570\u306b<br>\u683c\u7d0d<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u8a08\u7b97\u30fb\u66f8\u5f0f\u5909\u63db<br>\u3057\u3066\u51fa\u529b<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-02\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">02<\/span>\n  <span class=\"section-label\" style=\"display:block;\">GET DATE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u4eca\u65e5\u306e\u65e5\u4ed8\u30fb\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/span>\n  <span class=\"section-desc\">Date\u30fbTime\u30fbNow\u30fbYear\u30fbMonth\u30fbDay\u95a2\u6570<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u3067\u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b\u4e3b\u306a\u95a2\u6570\u3068\u3057\u3066`Date`\uff08\u4eca\u65e5\u306e\u65e5\u4ed8\uff09\u3001`Time`\uff08\u73fe\u5728\u306e\u6642\u523b\uff09\u3001`Now`\uff08\u65e5\u4ed8\u3068\u6642\u523b\u306e\u4e21\u65b9\uff09\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u3092\u53d6\u5f97\nDim today As Date\nDim currentTime As Date\nDim currentDateTime As Date\n\ntoday = Date          ' \u4f8b: 2024\/07\/10\ncurrentTime = Time    ' \u4f8b: 14:30:25\ncurrentDateTime = Now ' \u4f8b: 2024\/07\/10 14:30:25\n\nDebug.Print today\nDebug.Print currentTime\nDebug.Print currentDateTime\n\n' \u5e74\u30fb\u6708\u30fb\u65e5\u30fb\u6642\u30fb\u5206\u30fb\u79d2\u3092\u500b\u5225\u306b\u53d6\u5f97\nDebug.Print Year(today)    ' 2024\nDebug.Print Month(today)   ' 7\nDebug.Print Day(today)     ' 10\nDebug.Print Hour(Now)      ' 14\nDebug.Print Minute(Now)    ' 30\nDebug.Print Second(Now)    ' 25\n\n' \u66dc\u65e5\u3092\u53d6\u5f97\uff081=\u65e5\u66dc, 2=\u6708\u66dc ... 7=\u571f\u66dc\uff09\nDim weekdayNum As Integer\nweekdayNum = Weekday(today)\nDebug.Print weekdayNum\n\n' \u66dc\u65e5\u306e\u540d\u524d\u3092\u53d6\u5f97\nDim weekdayName As String\nweekdayName = WeekdayName(Weekday(today))\nDebug.Print weekdayName   ' \u4f8b: \u6c34\u66dc\u65e5<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">`Date`\u3068`Now`\u306e\u9055\u3044\u306f\u300c\u6642\u523b\u90e8\u5206\u3092\u542b\u3080\u304b\u3069\u3046\u304b\u300d\u3067\u3059\u3002\u65e5\u4ed8\u306e\u307f\u3092\u6271\u3046\u51e6\u7406\uff08\u300c\u4eca\u65e5\u306f\u4f55\u65e5\u304b\u300d\u306e\u5224\u5b9a\u306a\u3069\uff09\u306f`Date`\u3092\u4f7f\u3044\u3001\u300c\u4f55\u6642\u4f55\u5206\u306b\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u305f\u304b\u300d\u306e\u30ed\u30b0\u8a18\u9332\u306b\u306f`Now`\u3092\u4f7f\u3046\u3068\u6574\u7406\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>WeekDay\u95a2\u6570<\/strong>\uff1aVBA\u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3067\u3001\u6307\u5b9a\u3057\u305f\u65e5\u4ed8\u306e\u66dc\u65e5\u30921\u301c7\u306e\u6574\u6570\u3067\u8fd4\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306f1=\u65e5\u66dc\u65e5\u30fb7=\u571f\u66dc\u65e5\u3060\u304c\u3001\u7b2c2\u5f15\u6570\u3067\u9031\u306e\u958b\u59cb\u66dc\u65e5\u3092\u5909\u66f4\u3067\u304d\u308b\uff08vbMonday=2\u3067\u6708\u66dc\u59cb\u307e\u308a\u306b\u3059\u308b\u7b49\uff09\u3002\u5b9f\u52d9\u3067\u306f\u300c\u571f\u65e5\u3092\u5224\u5b9a\u3057\u3066\u51e6\u7406\u3092\u5206\u5c90\u3059\u308b\u300d\u52e4\u6020\u30fb\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u7cfb\u30de\u30af\u30ed\u3067\u3088\u304f\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' \u6708\u672b\u65e5\u3092\u53d6\u5f97\u3059\u308b\u5b9f\u7528\u4f8b\nFunction GetMonthEnd(targetYear As Integer, targetMonth As Integer) As Date\n    ' \u7fcc\u67081\u65e5\u304b\u30891\u65e5\u5f15\u304f\u3068\u6708\u672b\u65e5\u306b\u306a\u308b\n    Dim nextMonth As Date\n    If targetMonth = 12 Then\n        nextMonth = DateSerial(targetYear + 1, 1, 1)\n    Else\n        nextMonth = DateSerial(targetYear, targetMonth + 1, 1)\n    End If\n    GetMonthEnd = nextMonth - 1\nEnd Function\n\n' \u4f7f\u7528\u4f8b\nDim lastDay As Date\nlastDay = GetMonthEnd(2024, 2)  ' 2024\/02\/29 (\u3046\u308b\u3046\u5e74)\nDebug.Print lastDay<\/code><\/pre>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-03\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">03<\/span>\n  <span class=\"section-label\" style=\"display:block;\">FORMAT<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Format\u95a2\u6570\u3067\u65e5\u4ed8\u3092\u66f8\u5f0f\u5909\u63db\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u66f8\u5f0f\u30b3\u30fc\u30c9\u4e00\u89a7\u3068\u5b9f\u52d9\u3067\u3088\u304f\u4f7f\u3046\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u4ed8\u3092\u300c2024\u5e747\u670810\u65e5\uff08\u6c34\uff09\u300d\u300c20240710\u300d\u300cR6.7.10\u300d\u306a\u3069\u7279\u5b9a\u306e\u66f8\u5f0f\u306e\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u306b\u306f`Format`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u66f8\u5f0f\u30b3\u30fc\u30c9<\/th><th>\u51fa\u529b\u4f8b<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>yyyy\/mm\/dd<\/td><td>2024\/07\/10<\/td><td>\u897f\u66a6\u5e744\u6841\/\u67082\u6841\/\u65e52\u6841\uff08\u6700\u3082\u3088\u304f\u4f7f\u3046\uff09<\/td><\/tr>\n<tr><td>yyyy\u5e74mm\u6708dd\u65e5<\/td><td>2024\u5e7407\u670810\u65e5<\/td><td>\u65e5\u672c\u8a9e\u8868\u8a18<\/td><\/tr>\n<tr><td>yyyymmdd<\/td><td>20240710<\/td><td>\u30d5\u30a1\u30a4\u30eb\u540d\u7528\u306e\u533a\u5207\u308a\u7121\u30578\u6841<\/td><\/tr>\n<tr><td>yy\/mm\/dd<\/td><td>24\/07\/10<\/td><td>\u897f\u66a6\u5e74\u4e0b2\u6841<\/td><\/tr>\n<tr><td>mm\/dd<\/td><td>07\/10<\/td><td>\u6708\u65e5\u306e\u307f<\/td><\/tr>\n<tr><td>m\u6708d\u65e5(aaa)<\/td><td>7\u670810\u65e5(\u6c34)<\/td><td>\u6708\u65e5+\u66dc\u65e5\u7701\u7565\u5f62<\/td><\/tr>\n<tr><td>dddd<\/td><td>\u6c34\u66dc\u65e5<\/td><td>\u66dc\u65e5\u30d5\u30eb\u30cd\u30fc\u30e0<\/td><\/tr>\n<tr><td>hh:mm:ss<\/td><td>14:30:25<\/td><td>\u6642\u5206\u79d2<\/td><\/tr>\n<tr><td>yyyy\/mm\/dd hh:mm<\/td><td>2024\/07\/10 14:30<\/td><td>\u65e5\u4ed8\uff0b\u6642\u523b<\/td><\/tr>\n<tr><td>ggge\u5e74mm\u6708dd\u65e5<\/td><td>R6\u5e7407\u670810\u65e5<\/td><td>\u5143\u53f7\u8868\u8a18\uff08\u548c\u66a6\uff09<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' Format\u95a2\u6570\u306e\u4f7f\u3044\u65b9\nDim d As Date\nd = #2024\/7\/10#\n\nDebug.Print Format(d, \"yyyy\/mm\/dd\")            ' 2024\/07\/10\nDebug.Print Format(d, \"yyyy\u5e74mm\u6708dd\u65e5\")          ' 2024\u5e7407\u670810\u65e5\nDebug.Print Format(d, \"yyyymmdd\")               ' 20240710\nDebug.Print Format(d, \"m\u6708d\u65e5(aaa)\")            ' 7\u670810\u65e5(\u6c34)\nDebug.Print Format(d, \"ggge\u5e74mm\u6708dd\u65e5\")          ' R6\u5e7407\u670810\u65e5\uff08\u548c\u66a6\uff09\n\n' Excel\u30bb\u30eb\u3078\u306e\u65e5\u4ed8\u5165\u529b\uff08\u66f8\u5f0f\u4ed8\u304d\uff09\nSub FormatDateToCell()\n    Dim ws As Worksheet\n    Set ws = ThisWorkbook.Sheets(1)\n\n    Dim targetDate As Date\n    targetDate = Date\n\n    ' A1\u30bb\u30eb\u306b\u5024\u3068\u3057\u3066\u5165\u308c\u308b\n    ws.Range(\"A1\").Value = targetDate\n    ' \u66f8\u5f0f\u3092\u8a2d\u5b9a\n    ws.Range(\"A1\").NumberFormat = \"yyyy\/mm\/dd\"\n\n    ' B1\u30bb\u30eb\u306b\u6587\u5b57\u5217\u3068\u3057\u3066\u5165\u308c\u308b\n    ws.Range(\"B1\").Value = Format(targetDate, \"yyyy\u5e74mm\u6708dd\u65e5\")\nEnd Sub<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Excel\u30bb\u30eb\u3078\u306e\u65e5\u4ed8\u5165\u529b\u306b\u306f\u300cValue\u306b\u65e5\u4ed8\u578b\u3092\u5165\u308c\u3066NumberFormat\u3067\u66f8\u5f0f\u8a2d\u5b9a\u3059\u308b\u300d\u65b9\u6cd5\u3068\u300cFormat\u3067\u6587\u5b57\u5217\u5909\u63db\u3057\u3066\u304b\u3089\u5165\u308c\u308b\u300d\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u8a08\u7b97\u306b\u4f7f\u3046\u5834\u5408\u306f\u524d\u8005\uff08\u65e5\u4ed8\u578b\u306e\u307e\u307e\uff09\u304c\u6b63\u3057\u304f\u3001\u898b\u305f\u76ee\u306e\u307f\u306e\u5834\u5408\u306f\u5f8c\u8005\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u5f8c\u8005\u306f\u6587\u5b57\u5217\u306a\u306e\u3067\u3001\u305d\u306e\u5f8c\u306e\u65e5\u4ed8\u8a08\u7b97\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u70b9\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-04\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">04<\/span>\n  <span class=\"section-label\" style=\"display:block;\">COMPARE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u65e5\u4ed8\u306e\u6bd4\u8f03\u30fb\u5927\u5c0f\u5224\u5b9a<\/span>\n  <span class=\"section-desc\">\u6bd4\u8f03\u6f14\u7b97\u5b50\u3068\u671f\u9650\u30c1\u30a7\u30c3\u30af\u306e\u5b9f\u88c5\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306e\u65e5\u4ed8\u6bd4\u8f03\u306f\u901a\u5e38\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\uff08`<`\u30fb`>`\u30fb`=`\u30fb`<=`\u30fb`>=`\uff09\u3067\u305d\u306e\u307e\u307e\u4f7f\u3048\u307e\u3059\u3002\u3053\u308c\u306fDate\u578b\u304c\u5185\u90e8\u7684\u306b\u6570\u5024\uff08\u30b7\u30ea\u30a2\u30eb\u5024\uff09\u3067\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' \u65e5\u4ed8\u306e\u6bd4\u8f03\u30d1\u30bf\u30fc\u30f3\nDim d1 As Date\nDim d2 As Date\nd1 = #2024\/01\/15#\nd2 = #2024\/03\/31#\n\n' \u5927\u5c0f\u6bd4\u8f03\nIf d1 &lt; d2 Then\n    Debug.Print \"d1\u306fd2\u3088\u308a\u524d\u306e\u65e5\u4ed8\"\nEnd If\n\n' \u540c\u65e5\u30c1\u30a7\u30c3\u30af\nIf d1 = Date Then\n    Debug.Print \"d1\u306f\u4eca\u65e5\"\nEnd If\n\n' \u671f\u9650\u30c1\u30a7\u30c3\u30af\u306e\u5b9f\u7528\u4f8b\nSub CheckDeadline()\n    Dim deadline As Date\n    deadline = #2024\/07\/31#\n\n    Dim daysLeft As Long\n    daysLeft = deadline - Date   ' \u65e5\u6570\u5dee\u3092\u30b7\u30ea\u30a2\u30eb\u5024\u306e\u5f15\u304d\u7b97\u3067\u53d6\u5f97\n\n    If daysLeft &lt; 0 Then\n        MsgBox \"\u671f\u9650\u3092 \" &amp; Abs(daysLeft) &amp; \" \u65e5\u8d85\u904e\u3057\u3066\u3044\u307e\u3059\uff01\", vbCritical\n    ElseIf daysLeft &lt;= 7 Then\n        MsgBox \"\u671f\u9650\u307e\u3067\u3042\u3068 \" &amp; daysLeft &amp; \" \u65e5\u3067\u3059\u3002\", vbExclamation\n    Else\n        MsgBox \"\u671f\u9650\u307e\u3067\u3042\u3068 \" &amp; daysLeft &amp; \" \u65e5\u3042\u308a\u307e\u3059\u3002\", vbInformation\n    End If\nEnd Sub<\/code><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>DateSerial\u95a2\u6570<\/strong>\uff1a\u5e74\u30fb\u6708\u30fb\u65e5\u3092\u500b\u5225\u306e\u6574\u6570\u5024\u304b\u3089\u65e5\u4ed8\u578b\u3092\u751f\u6210\u3059\u308b\u95a2\u6570\u3002DateSerial(2024, 7, 10)\u306f2024\u5e747\u670810\u65e5\u3092\u8fd4\u3059\u3002\u6708\u672b\u65e5\u306e\u8a08\u7b97\uff08\u7fcc\u67081\u65e5\u306e\u524d\u65e5\uff09\u3084\u300cn\u5e74\u5f8c\u306e\u540c\u6708\u540c\u65e5\u300d\u306e\u8a08\u7b97\u306b\u7279\u306b\u4fbf\u5229\u3002\u307e\u305f\u6708\u306b12\u3092\u8d85\u3048\u308b\u6570\u3084\u65e5\u306b0\u4ee5\u4e0b\u306e\u6570\u3092\u6e21\u3057\u3066\u3082\u6b63\u3057\u304f\u7e70\u308a\u4e0a\u304c\u308a\u30fb\u7e70\u308a\u4e0b\u304c\u308a\u304c\u51e6\u7406\u3055\u308c\u308b\u305f\u3081\u3001\u300c\u5148\u6708\u306e\u672b\u65e5\u300d\u3092DateSerial(Year(Date), Month(Date), 0)\u3068\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u6587\u5b57\u5217\u306e\u307e\u307e\u65e5\u4ed8\u3092\u6bd4\u8f03\u3057\u3066\u306f\u3044\u3051\u306a\u3044<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u300c\"2024\/12\/01\" > \"2024\/09\/30\"\u300d\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u8f9e\u66f8\u9806\u6bd4\u8f03\u306b\u306a\u308a\u3001\u65e5\u4ed8\u306e\u5927\u5c0f\u3068\u306f\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002\u5fc5\u305aDate\u578b\u307e\u305f\u306f\u30b7\u30ea\u30a2\u30eb\u5024\uff08Long\/Double\uff09\u306b\u5909\u63db\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001CDate\u3078\u306e\u5909\u63db\u524d\u306bIsDate\u306b\u3088\u308b\u691c\u8a3c\u3092\u5fd8\u308c\u305a\u306b\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-05\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">05<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CALCULATE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">DateAdd\u30fbDateDiff\u95a2\u6570\u3067\u65e5\u4ed8\u8a08\u7b97<\/span>\n  <span class=\"section-desc\">\u671f\u9593\u52a0\u7b97\u30fb\u7d4c\u904e\u65e5\u6570\u30fb\u6708\u6570\u306e\u5dee\u306e\u6c42\u3081\u65b9<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u4ed8\u306e\u52a0\u6e1b\u7b97\u306b\u306f`DateAdd`\u95a2\u6570\u30012\u3064\u306e\u65e5\u4ed8\u306e\u5dee\u3092\u6c42\u3081\u308b\u306b\u306f`DateDiff`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u300c\u6708\u672b\u306e\u65e5\u6570\u5dee\u300d\u3084\u300c\u5e74\u5358\u4f4d\u306e\u52a0\u7b97\u300d\u306a\u3069\u3001\u5358\u7d14\u306a\u8db3\u3057\u7b97\u3067\u306f\u6b63\u78ba\u306b\u8a08\u7b97\u3067\u304d\u306a\u3044\u51e6\u7406\u3067\u7279\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' DateAdd\u95a2\u6570: \u65e5\u4ed8\u306b\u671f\u9593\u3092\u52a0\u7b97\u3059\u308b\n' DateAdd(interval, number, date)\n'   interval: \u52a0\u7b97\u5358\u4f4d (\"yyyy\"=\u5e74, \"m\"=\u6708, \"d\"=\u65e5, \"ww\"=\u9031, \"h\"=\u6642, \"n\"=\u5206, \"s\"=\u79d2)\n'   number: \u52a0\u7b97\u3059\u308b\u6570\u5024\uff08\u8ca0\u6570\u3067\u6e1b\u7b97\uff09\n'   date: \u57fa\u6e96\u3068\u306a\u308b\u65e5\u4ed8\n\nDim baseDate As Date\nbaseDate = #2024\/01\/31#\n\n' 1\u5e74\u5f8c \u2192 2025\/01\/31\nDebug.Print DateAdd(\"yyyy\", 1, baseDate)\n\n' 3\u30f6\u6708\u5f8c \u2192 2024\/04\/30 (\u6708\u672b\u3092\u8d85\u3048\u306a\u3044)\nDebug.Print DateAdd(\"m\", 3, baseDate)\n\n' 10\u65e5\u5f8c \u2192 2024\/02\/10\nDebug.Print DateAdd(\"d\", 10, baseDate)\n\n' 2\u9031\u9593\u5f8c \u2192 2024\/02\/14\nDebug.Print DateAdd(\"ww\", 2, baseDate)\n\n' ===========================\n' DateDiff\u95a2\u6570: 2\u3064\u306e\u65e5\u4ed8\u306e\u5dee\u3092\u6c42\u3081\u308b\n' DateDiff(interval, date1, date2)\n'   interval: \u5dee\u306e\u5358\u4f4d (DateAdd\u3068\u540c\u3058)\n'   date1, date2: \u6bd4\u8f03\u3059\u308b2\u3064\u306e\u65e5\u4ed8\uff08date2 - date1\u306e\u5dee\uff09\n' ===========================\n\nDim startDate As Date\nDim endDate As Date\nstartDate = #2024\/04\/01#\nendDate = #2024\/07\/10#\n\n' \u7d4c\u904e\u65e5\u6570\nDebug.Print DateDiff(\"d\", startDate, endDate)     ' 100\n\n' \u7d4c\u904e\u30f6\u6708\u6570\uff08\u5207\u308a\u6368\u3066\uff09\nDebug.Print DateDiff(\"m\", startDate, endDate)     ' 3\n\n' \u7d4c\u904e\u5e74\u6570\nDebug.Print DateDiff(\"yyyy\", #2000\/05\/15#, Date) ' \u4f8b: 24<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">DateAdd(\"m\", 1, \"2024\/01\/31\")\u306f\u300c2024\/02\/31\u300d\u3067\u306f\u306a\u304f\u6b63\u3057\u304f\u300c2024\/02\/29\u300d\uff08\u3046\u308b\u3046\u5e74\u306e\u305f\u3081\uff09\u3092\u8fd4\u3057\u307e\u3059\u3002\u6708\u672b\u65e5\u3092\u307e\u305f\u3050\u6708\u52a0\u7b97\u3092\u81ea\u52d5\u7684\u306b\u6708\u672b\u306b\u4e38\u3081\u3066\u304f\u308c\u308b\u305f\u3081\u3001\u300c\u7fcc\u6708\u672b\u7de0\u3081\u300d\u306e\u8acb\u6c42\u66f8\u30de\u30af\u30ed\u306a\u3069\u3067\u91cd\u5b9d\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">DateDiff\u95a2\u6570\u306e\u6ce8\u610f\u70b9\uff1a\u6708\u6570\u5dee\u306e\u300c\u5207\u308a\u6368\u3066\u300d\u52d5\u4f5c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">DateDiff(\"m\", d1, d2)\u306f\u300c\u5b8c\u5168\u306a1\u30f6\u6708\u300d\u306e\u6570\u3092\u8fd4\u3057\u307e\u3059\u3002\u4f8b\u3048\u30702024\u5e744\u67081\u65e5\u301c2024\u5e746\u670830\u65e5\u306eDateDiff(\"m\")\u306f\u300c2\u300d\u3067\u3059\uff084\u6708\u21925\u6708\u21926\u6708\u30673\u30f6\u6708\u306b\u898b\u3048\u307e\u3059\u304c\u30016\u670830\u65e5\u306f\u300c7\u67081\u65e5\u306e\u524d\u65e5\u300d\u306a\u306e\u30676\u6708\u304c\u5b8c\u7d50\u3057\u3066\u3044\u306a\u3044\uff09\u3002\u3053\u306e\u52d5\u4f5c\u306f\u76f4\u611f\u3068\u7570\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001\u300c\u25cb\u6708\u7d4c\u904e\u3057\u3066\u3044\u308b\u304b\u300d\u3092\u53b3\u5bc6\u306b\u5224\u5b9a\u3059\u308b\u5834\u5408\u306f\u7d50\u679c\u306b+1\u3059\u308b\u304b\u3001\u7d42\u4e86\u65e5\u3092\u300c\u7fcc\u67081\u65e5\u300d\u306b\u8a2d\u5b9a\u3057\u3066\u8a08\u7b97\u3059\u308b\u306a\u3069\u306e\u5de5\u592b\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001\u300c\u4eca\u65e5\u304b\u3089\u4f55\u55b6\u696d\u65e5\u5f8c\u304b\u300d\u3068\u3044\u3046\u8a08\u7b97\u306fDateAdd\u3084DateDiff\u3060\u3051\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u307e\u305b\u3093\u3002\u571f\u65e5\u30fb\u795d\u65e5\u3092\u9664\u5916\u3057\u305f\u300c\u5b9f\u7a3c\u50cd\u65e5\u30d9\u30fc\u30b9\u306e\u65e5\u6570\u8a08\u7b97\u300d\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001Excel\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u306eNetworkDays\u95a2\u6570\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3059`Application.WorksheetFunction.NetworkDays(startDate, endDate)`\u3092\u4f7f\u3046\u304b\u3001\u30ab\u30ec\u30f3\u30c0\u30fc\u30c7\u30fc\u30bf\uff08\u795d\u65e5\u4e00\u89a7\uff09\u3092\u5225\u30b7\u30fc\u30c8\u306b\u6301\u3061\u30eb\u30fc\u30d7\u51e6\u7406\u3067\u8a08\u7b97\u3059\u308b\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\">\u8acb\u6c42\u65e5<br>\uff08Date\u578b\uff09<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">DateAdd(\"m\",1)<br>\u3067\u7fcc\u6708\u52a0\u7b97<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u7fcc\u6708\u540c\u65e5\u3092<br>\u53d6\u5f97<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">DateSerial()\u3067<br>\u6708\u672b\u65e5\u306b\u4e38\u3081<\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\">\u30bb\u30eb\u306b<br>\u51fa\u529b<\/div>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' \u5b9f\u52d9\u4f8b\uff1a\u8acb\u6c42\u66f8\u306e\u652f\u6255\u671f\u65e5\uff08\u7fcc\u6708\u672b\uff09\u3092\u81ea\u52d5\u8a08\u7b97\nFunction GetPaymentDueDate(invoiceDate As Date) As Date\n    ' \u7fcc\u6708\u306e1\u65e5\u3092\u53d6\u5f97\n    Dim nextMonthFirst As Date\n    nextMonthFirst = DateSerial(Year(invoiceDate), Month(invoiceDate) + 1, 1)\n\n    ' \u7fcc\u6708\u672b\u65e5\uff08\u7fcc\u3005\u67081\u65e5 - 1\u65e5\uff09\n    GetPaymentDueDate = DateSerial(Year(invoiceDate), Month(invoiceDate) + 2, 0)\nEnd Function\n\n' \u4f7f\u7528\u4f8b\nDim invoice As Date\ninvoice = #2024\/06\/25#\nDebug.Print GetPaymentDueDate(invoice)   ' 2024\/07\/31<\/code><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>DatePart\u95a2\u6570<\/strong>\uff1a\u65e5\u4ed8\u304b\u3089\u6307\u5b9a\u3057\u305f\u90e8\u5206\uff08\u5e74\u30fb\u6708\u30fb\u65e5\u30fb\u6642\u30fb\u5206\u30fb\u79d2\u30fb\u66dc\u65e5\u30fb\u9031\u756a\u53f7\u30fb\u56db\u534a\u671f\uff09\u3092\u6574\u6570\u3068\u3057\u3066\u62bd\u51fa\u3059\u308b\u6c4e\u7528\u95a2\u6570\u3002DatePart(\"q\", Date)\u3067\u73fe\u5728\u306e\u56db\u534a\u671f\uff081\u301c4\uff09\u3092\u53d6\u5f97\u3067\u304d\u308b\u3002Year()\u30fbMonth()\u30fbDay()\u306a\u3069\u306e\u500b\u5225\u95a2\u6570\u3067\u3082\u540c\u3058\u51e6\u7406\u304c\u3067\u304d\u308b\u304c\u3001DatePart\u306f\u52d5\u7684\u306b\u62bd\u51fa\u90e8\u5206\u3092\u5909\u3048\u305f\u3044\u5834\u5408\uff08interval\u5f15\u6570\u306b\u5909\u6570\u3092\u6e21\u3059\uff09\u306b\u4fbf\u5229\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-06\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">06<\/span>\n  <span class=\"section-label\" style=\"display:block;\">VALIDATE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">IsDate\u30fbCDate\u95a2\u6570\u3067\u5b89\u5168\u306b\u5909\u63db\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u65e5\u4ed8\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3068\u578b\u5909\u63db<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e6\u30fc\u30b6\u30fc\u304c\u5165\u529b\u3057\u305f\u6587\u5b57\u5217\u3084\u3001\u30bb\u30eb\u304b\u3089\u8aad\u307f\u53d6\u3063\u305f\u5024\u304c\u300c\u6709\u52b9\u306a\u65e5\u4ed8\u304b\u3069\u3046\u304b\u300d\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089Date\u578b\u306b\u5909\u63db\u3059\u308b\u306b\u306f\u3001`IsDate`\u95a2\u6570\u3068`CDate`\u95a2\u6570\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' IsDate: \u65e5\u4ed8\u3068\u3057\u3066\u6709\u52b9\u304b\u30c1\u30a7\u30c3\u30af (True\/False)\nDebug.Print IsDate(\"2024\/07\/10\")    ' True\nDebug.Print IsDate(\"2024\/13\/01\")    ' False (13\u6708\u306f\u5b58\u5728\u3057\u306a\u3044)\nDebug.Print IsDate(\"abc\")           ' False\n\n' CDate: \u6587\u5b57\u5217\u30fb\u6570\u5024\u3092Date\u578b\u306b\u5909\u63db\nDim str1 As String\nstr1 = \"2024\u5e747\u670810\u65e5\"\nIf IsDate(str1) Then\n    Dim d As Date\n    d = CDate(str1)\n    Debug.Print d    ' 2024\/07\/10\nEnd If\n\n' \u30bb\u30eb\u304b\u3089\u65e5\u4ed8\u3092\u5b89\u5168\u306b\u8aad\u307f\u53d6\u308b\u30d1\u30bf\u30fc\u30f3\nSub ReadDateFromCell()\n    Dim ws As Worksheet\n    Set ws = ThisWorkbook.Sheets(1)\n\n    Dim cellValue As Variant\n    cellValue = ws.Range(\"A1\").Value\n\n    If IsDate(cellValue) Then\n        Dim readDate As Date\n        readDate = CDate(cellValue)\n        Debug.Print \"\u6709\u52b9\u306a\u65e5\u4ed8: \" &amp; Format(readDate, \"yyyy\/mm\/dd\")\n    Else\n        MsgBox \"A1\u30bb\u30eb\u306b\u6709\u52b9\u306a\u65e5\u4ed8\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\", vbCritical\n    End If\nEnd Sub<\/code><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u30bb\u30eb\u306e\u5024\u306f\u5fc5\u305aVariant\u578b\u3067\u53d7\u3051\u53d6\u308b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u30bb\u30eb\u306e\u5024\u3092String\u578b\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u30bb\u30eb\u304b\u3089\u5024\u3092\u8aad\u307f\u53d6\u308b\u969b\u306f`Dim cellValue As Variant`\u3067Variant\u578b\u3092\u4f7f\u3044\u3001IsDate\u3067\u691c\u8a3c\u3057\u3066\u304b\u3089CDate\u3067\u5909\u63db\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u304c\u6700\u3082\u5b89\u5168\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eDate\u578b\u3068Excel\u306e\u65e5\u4ed8\u30bb\u30eb\u306b\u306f\u300c\u898b\u305f\u76ee\u3068\u5185\u90e8\u5024\u306e\u4e56\u96e2\u300d\u3068\u3044\u3046\u843d\u3068\u3057\u7a74\u304c\u3042\u308a\u307e\u3059\u3002Excel\u3067\u300c2024\/07\/10\u300d\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u3066\u3082\u3001\u30bb\u30eb\u306e\u5b9f\u4f53\u306f\u30b7\u30ea\u30a2\u30eb\u5024\uff0845483\u306a\u3069\uff09\u306e\u6570\u5024\u3067\u3059\u3002`Range(\"A1\").Value`\u3092\u53d6\u5f97\u3059\u308b\u3068Double\u578b\u306e\u6570\u5024\u304c\u8fd4\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092IsDate\u3067\u691c\u8a3c\u3059\u308b\u3068True\u306b\u306a\u308a\u3001CDate\u3067\u6b63\u3057\u304fDate\u578b\u306b\u5909\u63db\u3067\u304d\u307e\u3059\u3002\u4e00\u65b9\u3001`Range(\"A1\").Text`\u3092\u4f7f\u3046\u3068\u753b\u9762\u8868\u793a\u306e\u6587\u5b57\u5217\uff08\u300c2024\/07\/10\u300d\uff09\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u304c\u3001\u30bb\u30eb\u306e\u66f8\u5f0f\u306b\u3088\u3063\u3066\u300c7\u670810\u65e5\u300d\u3084\u300c2024.07.10\u300d\u306a\u3069\u7570\u306a\u308b\u6587\u5b57\u5217\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u65e5\u4ed8\u306e\u8aad\u307f\u53d6\u308a\u306f`.Value`\u3092\u4f7f\u3044\u3001\u30b7\u30ea\u30a2\u30eb\u5024\u3092CDate\u3067\u5909\u63db\u3059\u308b\u65b9\u304c\u66f8\u5f0f\u306e\u5f71\u97ff\u3092\u53d7\u3051\u306b\u304f\u304f\u5b89\u5b9a\u3057\u305f\u52d5\u4f5c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:8px;padding:20px 24px;margin:24px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#6b7280;margin-bottom:8px;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Consolas','Courier New',monospace;font-size:14px;line-height:1.7;color:#cdd6f4;white-space:pre-wrap;\"><code>' \u5e74\u9f62\u8a08\u7b97\u306e\u5b9f\u7528\u4f8b\uff08\u8a95\u751f\u65e5\u304b\u3089\u4eca\u65e5\u307e\u3067\u306e\u5e74\u6570\uff09\nFunction CalcAge(birthDate As Date) As Integer\n    Dim age As Integer\n    age = DateDiff(\"yyyy\", birthDate, Date)\n\n    ' \u4eca\u5e74\u306e\u8a95\u751f\u65e5\u304c\u307e\u3060\u6765\u3066\u3044\u306a\u3044\u5834\u5408\u306f1\u5f15\u304f\n    If Month(birthDate) &gt; Month(Date) Then\n        age = age - 1\n    ElseIf Month(birthDate) = Month(Date) And Day(birthDate) &gt; Day(Date) Then\n        age = age - 1\n    End If\n    CalcAge = age\nEnd Function\n\n' \u4f7f\u7528\u4f8b\nDim birth As Date\nbirth = CDate(\"1990\/05\/25\")\nDebug.Print CalcAge(birth)   ' \u4eca\u65e5\u73fe\u5728\u306e\u5e74\u9f62<\/code><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>CDate\u95a2\u6570<\/strong>\uff1a\u69d8\u3005\u306a\u30c7\u30fc\u30bf\u578b\uff08String\u30fbInteger\u30fbDouble\u7b49\uff09\u3092Date\u578b\u306b\u5f37\u5236\u5909\u63db\u3059\u308bVBA\u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3002CDate(\"2024\/7\/10\")\u30fbCDate(45292)\u3069\u3061\u3089\u30822024\/07\/10\u3092\u8fd4\u3059\u3002\u6ce8\u610f\u70b9\u3068\u3057\u3066\u3001\u5909\u63db\u3067\u304d\u306a\u3044\u5024\u304c\u6e21\u3055\u308c\u308b\u3068\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u300d\u30a8\u30e9\u30fc\uff08\u5b9f\u884c\u6642\u30a8\u30e9\u30fc13\uff09\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5fc5\u305aIsDate\u3067\u4e8b\u524d\u691c\u8a3c\u3059\u308b\u304b\u3001On Error GoTo\u3067\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u300cIsDate + CDate\u300d\u306e\u7d44\u307f\u5408\u308f\u305b\u306f\u3001Excel\u30b7\u30fc\u30c8\u306e\u30c7\u30fc\u30bf\u3092\u30eb\u30fc\u30d7\u3057\u3066\u51e6\u7406\u3059\u308b\u30de\u30af\u30ed\u3067\u306f\u9244\u5247\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u65e5\u4ed8\u30bb\u30eb\u306b\u6587\u5b57\u5217\u3084\u7a7a\u767d\u3092\u5165\u529b\u3057\u3066\u3044\u308b\u30b1\u30fc\u30b9\u304c\u5fc5\u305a\u3042\u308a\u307e\u3059\u3002IsDate\u30c1\u30a7\u30c3\u30af\u306a\u3057\u306bCDate\u3092\u547c\u3076\u3068\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3067\u30de\u30af\u30ed\u304c\u6b62\u307e\u308a\u3001\u30c7\u30fc\u30bf\u304c\u4e2d\u9014\u534a\u7aef\u306a\u72b6\u614b\u306b\u306a\u308b\u5371\u967a\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-date-handling&#038;blog_slug=cc-vba-date-handling\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-vba-date-handling&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-07\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">07<\/span>\n  <span class=\"section-label\" style=\"display:block;\">AI AUTOMATION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Claude Code\u3067VBA\u30de\u30af\u30ed\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u65e5\u4ed8\u51e6\u7406\u30de\u30af\u30ed\u3092AI\u306b\u66f8\u304b\u305b\u308b\u5177\u4f53\u7684\u306a\u6307\u793a\u65b9\u6cd5<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306e\u65e5\u4ed8\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u6bce\u56de\u624b\u66f8\u304d\u3059\u308b\u3088\u308a\u3001Claude Code\u306b\u300c\u3069\u3093\u306a\u30de\u30af\u30ed\u304c\u5fc5\u8981\u304b\u300d\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u4f1d\u3048\u3066\u81ea\u52d5\u751f\u6210\u3055\u305b\u308b\u65b9\u304c\u5727\u5012\u7684\u306b\u52b9\u7387\u7684\u3067\u3059\u3002\u30b3\u30fc\u30c9\u306e\u66f8\u304d\u65b9\u3092\u899a\u3048\u3066\u3044\u306a\u304f\u3066\u3082\u3001\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u4f1d\u3048\u308b\u3060\u3051\u3067\u52d5\u4f5c\u3059\u308bVBA\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u300c\u4eca\u65e5\u306e\u65e5\u4ed8\u3092A1\u30bb\u30eb\u306b\u5165\u308c\u3066\u3001\u7fcc\u6708\u672b\u65e5\u3092B1\u30bb\u30eb\u306b\u81ea\u52d5\u5165\u529b\u3059\u308bVBA\u30de\u30af\u30ed\u300d<\/strong>\u2192 1\u5206\u3067\u5b8c\u6210<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u300cC\u5217\u306e\u65e5\u4ed8\u3068\u4eca\u65e5\u3092\u6bd4\u8f03\u3057\u3066\u3001\u671f\u9650\u5207\u308c\u306e\u884c\u3092D\u5217\u306b\u8d64\u8272\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3059\u308b\u30de\u30af\u30ed\u300d<\/strong>\u2192 3\u5206\u3067\u5b8c\u6210<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u300c\u5165\u529b\u3055\u308c\u305f\u8a95\u751f\u65e5\uff08B\u5217\uff09\u304b\u3089\u5e74\u9f62\u3092\u8a08\u7b97\u3057\u3066C\u5217\u306b\u5165\u529b\u3059\u308b\u30de\u30af\u30ed\uff08IsDate\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u4ed8\u304d\uff09\u300d<\/strong>\u2192 5\u5206\u3067\u5b8c\u6210<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u300c\u30b7\u30fc\u30c8\u306e\u65e5\u4ed8\u30c7\u30fc\u30bf\uff08A\u5217\uff09\u3092\u300cyyyy\u5e74mm\u6708dd\u65e5\uff08aaa\uff09\u300d\u5f62\u5f0f\u3067\u66f8\u304d\u76f4\u3059\u30de\u30af\u30ed\u300d<\/strong>\u2192 2\u5206\u3067\u5b8c\u6210<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u300c\u52e4\u6020\u8868\u306e\u51fa\u52e4\u65e5\u30fb\u9000\u52e4\u65e5\u304b\u3089\u7a3c\u50cd\u65e5\u6570\uff08\u571f\u65e5\u9664\u5916\uff09\u3092\u8a08\u7b97\u3059\u308bNetworkDays\u76f8\u5f53\u306eVBA\u95a2\u6570\u300d<\/strong>\u2192 10\u5206\u3067\u5b8c\u6210<\/span><\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code\u3078\u306e\u6307\u793a\u306e\u30b3\u30c4\u306f\u300c\u4f55\u306e\u30c7\u30fc\u30bf\u304c\u300d\u300c\u3069\u306e\u30bb\u30eb\u306b\u3042\u3063\u3066\u300d\u300c\u3069\u3093\u306a\u51e6\u7406\u3092\u3057\u3066\u300d\u300c\u3069\u3053\u306b\u51fa\u529b\u3057\u305f\u3044\u304b\u300d\u3092\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u3067\u3059\u3002\u300cVBA\u3067\u65e5\u4ed8\u3092\u51e6\u7406\u3057\u3066\u300d\u3068\u3044\u3046\u62bd\u8c61\u7684\u306a\u6307\u793a\u3088\u308a\u300cSheet1\u306eA\u5217\uff082\u884c\u76ee\u304b\u3089100\u884c\u76ee\uff09\u306b\u5165\u529b\u3055\u308c\u305f\u65e5\u4ed8\uff08yyyy\/mm\/dd\u5f62\u5f0f\uff09\u3092IsDate\u3067\u691c\u8a3c\u3057\u3001\u6709\u52b9\u306a\u3082\u306e\u306fB\u5217\u306b\u7fcc\u6708\u672b\u65e5\u3092\u8a08\u7b97\u3057\u3066\u51fa\u529b\u3002\u7121\u52b9\u306a\u3082\u306e\u306fC\u5217\u306b\"\u7121\u52b9\u306a\u65e5\u4ed8\"\u3068\u8868\u793a\u3059\u308b\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u300d\u3068\u3044\u3046\u5177\u4f53\u7684\u306a\u6307\u793a\u306e\u65b9\u304c\u3001\u4e00\u767a\u3067\u4f7f\u3048\u308b\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3055\u3089\u306b\u300c\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u5165\u308c\u3066\u300d\u300c\u30b3\u30e1\u30f3\u30c8\u3092\u65e5\u672c\u8a9e\u3067\u66f8\u3044\u3066\u300d\u300c\u30b7\u30fc\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306e\u5206\u5c90\u3082\u5165\u308c\u3066\u300d\u3068\u3044\u3046\u8ffd\u52a0\u6307\u793a\u3092\u52a0\u3048\u308b\u3068\u3001\u5b9f\u52d9\u6295\u5165\u3067\u304d\u308b\u54c1\u8cea\u306eVBA\u30b3\u30fc\u30c9\u304c\u5b8c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306fVBA\u306e\u6587\u6cd5\u3092\u5b66\u7fd2\u3059\u308b\u3088\u308a\u3082\u5148\u306b\u300c\u696d\u52d9\u306e\u81ea\u52d5\u5316\u300d\u3092\u9054\u6210\u3059\u308b\u6700\u901f\u306e\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Claude Code\u306bVBA\u30de\u30af\u30ed\u3092\u4f9d\u983c\u3059\u308b\u969b\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306e\u65e5\u4ed8\u51e6\u7406\u30de\u30af\u30ed\u3092Claude Code\u306b\u4f9d\u983c\u3059\u308b\u969b\u306e\u5177\u4f53\u7684\u306a\u30d7\u30ed\u30f3\u30d7\u30c8\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c\u30b7\u30fc\u30c8\u69cb\u6210\u30fb\u5217\u306e\u610f\u5473\u30fb\u51e6\u7406\u5185\u5bb9\u30fb\u51fa\u529b\u5148\u300d\u3092\u660e\u78ba\u306b\u4f1d\u3048\u308b\u3068\u3001\u4e00\u767a\u3067\u4f7f\u3048\u308b\u30b3\u30fc\u30c9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">Claude Code\u3078\u306e\u52b9\u679c\u7684\u306a\u4f9d\u983c\u6587\u4f8b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u300cExcel\u306eSheet1\u3092\u4f7f\u3044\u307e\u3059\u3002A\u5217\uff082\u884c\u76ee\u304b\u3089\uff09\u306b\u9867\u5ba2\u540d\u3001B\u5217\u306b\u5951\u7d04\u958b\u59cb\u65e5\uff08yyyy\/mm\/dd\uff09\u3001C\u5217\u306b\u5951\u7d04\u6708\u6570\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002D\u5217\u306b\u5951\u7d04\u7d42\u4e86\u65e5\uff08DateAdd\u3067\u5951\u7d04\u6708\u6570\u5f8c\u306e\u65e5\u4ed8\uff09\u3092\u8a08\u7b97\u3057\u3066\u5165\u529b\u3057\u3001E\u5217\u306b\u4eca\u65e5\u304b\u3089\u7d42\u4e86\u65e5\u307e\u3067\u306e\u6b8b\u308a\u65e5\u6570\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\u6b8b\u308a30\u65e5\u4ee5\u5185\u306fE\u5217\u3092\u8d64\u8272\u300131\u301c60\u65e5\u306f\u9ec4\u8272\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002IsDate\u3067B\u5217\u3092\u691c\u8a3c\u3057\u3001\u7121\u52b9\u306a\u5834\u5408\u306fF\u5217\u306b\u300c\u65e5\u4ed8\u30a8\u30e9\u30fc\u300d\u3068\u8868\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3068\u30b3\u30e1\u30f3\u30c8\u3092\u65e5\u672c\u8a9e\u3067\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\u300d<\/p>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a,#2a1015);border-radius:12px;padding:20px 24px;margin:24px 0;display:flex;align-items:center;gap:16px;color:#fff;\">\n  <span style=\"font-size:36px;\">&#127942;<\/span>\n  <div>\n    <div style=\"font-size:13px;color:#dc2626;font-weight:700;letter-spacing:1px;\">VERDICT<\/div>\n    <div style=\"font-size:18px;font-weight:800;\">Claude Code\u6d3b\u7528\u3092\u63a8\u5968<\/div>\n    <div style=\"font-size:14px;color:rgba(255,255,255,0.7);margin-top:4px;\">VBA\u306e\u65e5\u4ed8\u51e6\u7406\u30de\u30af\u30ed\u306fClaude Code\u3078\u306e\u81ea\u7136\u8a00\u8a9e\u6307\u793a\u3067\u81ea\u52d5\u751f\u6210\u3067\u304d\u308b\u3002\u30b3\u30fc\u30c9\u3092\u899a\u3048\u308b\u6642\u9593\u3092\u7701\u3044\u3066\u696d\u52d9\u81ea\u52d5\u5316\u306b\u96c6\u4e2d\u3067\u304d\u308b\u3002<\/div>\n  <\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u5f0a\u793eGENAI\u3067\u306f\u300cVBA\u30de\u30af\u30ed\u3067\u6708\u6b21\u5831\u544a\u66f8\u306e\u65e5\u4ed8\u51e6\u7406\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u300d\u300c\u52e4\u6020\u7ba1\u7406\u306e\u96c6\u8a08\u30de\u30af\u30ed\u3092\u4f5c\u308a\u305f\u3044\u300d\u3068\u3044\u3046Excel\u696d\u52d9\u81ea\u52d5\u5316\u306e\u30cb\u30fc\u30ba\u306b\u5bfe\u3057\u3001Claude Code\u3092\u4f7f\u3063\u305f\u8d85\u9ad8\u901f\u5b9f\u88c5\u652f\u63f4\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u30a8\u30f3\u30b8\u30cb\u30a2\u3078\u306e\u4f9d\u983c\u30fb\u52c9\u5f37\u30fb\u8a66\u884c\u932f\u8aa4\u306a\u3057\u306b\u3001\u696d\u52d9\u3092\u305d\u306e\u307e\u307e\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">ExcelVBA\u3092\u4f7f\u3063\u305f\u696d\u52d9\u81ea\u52d5\u5316\u30fb\u65e5\u4ed8\u51e6\u7406\u30de\u30af\u30ed\u306e\u69cb\u7bc9\u306b\u3064\u3044\u3066\u3001\u5f0a\u793eAI\u9b3c\u7ba1\u7406\u3067\u306f\u500b\u5225\u76f8\u8ac7\u3092\u627f\u3063\u3066\u3044\u307e\u3059\u3002\u300c\u6bce\u6708\u306e\u96c6\u8a08\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u300d\u300cVBA\u306e\u66f8\u304d\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u300d\u3068\u3044\u3046\u65b9\u306f\u3001\u516c\u5f0fLINE\u307e\u305f\u306f\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u304b\u3089\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);border-radius:16px;padding:36px 32px;margin:48px 0 16px;color:#fff;\">\n  <p style=\"font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"font-size:22px;font-weight:800;line-height:1.5;margin:0 0 20px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u3001\u3042\u306a\u305f\u306e\u30d3\u30b8\u30cd\u30b9\u3067<br>\u5b9f\u8df5\u3057\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n  <div style=\"background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:12px;padding:24px;max-width:560px;margin:0 auto;\">\n    <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">AI\u6d3b\u7528\u3092\u81ea\u793e\u3067\u56de\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u65b9\u3078<\/p>\n    <p style=\"font-size:20px;font-weight:800;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n    <p style=\"font-size:14px;color:rgba(255,255,255,0.75);margin:0 0 20px;line-height:1.7;\">Claude Code\u30fbCowork\u5c0e\u5165\u652f\u63f4\u304b\u3089\u696d\u52d9\u8a2d\u8a08\u30fb\u793e\u5185\u6d78\u900f\u307e\u3067\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3002\u300c\u81ea\u793e\u3067\u56de\u305b\u308b\u7d44\u7e54\u300d\u309290\u65e5\u3067\u4f5c\u308b\u7d4c\u55b6\u8005\u5411\u3051\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3002<\/p>\n    <div style=\"text-align:center;\">\n      <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&utm_medium=article&utm_campaign=cc-vba-date-handling&utm_content=next-step-cta\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;background:#dc2626;color:#fff;font-weight:700;font-size:15px;padding:14px 32px;border-radius:30px;text-decoration:none;\">AI\u9b3c\u7ba1\u7406\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `Date`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`Dim today As Date: today = Date`\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\uff08\u6642\u523b\u306a\u3057\uff09\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u73fe\u5728\u306e\u65e5\u6642\uff08\u6642\u523b\u542b\u3080\uff09\u306f`Now`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u5e74\u6708\u65e5\u3092\u500b\u5225\u306b\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f`Year(Date)`\u30fb`Month(Date)`\u30fb`Day(Date)`\u95a2\u6570\u304c\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067\u65e5\u4ed8\u3092yyyy\/mm\/dd\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `Format`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`Format(Date, \"yyyy\/mm\/dd\")`\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u304c\u300c2024\/07\/10\u300d\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u306b\u306a\u308a\u307e\u3059\u3002\u548c\u66a6\u306b\u3059\u308b\u5834\u5408\u306f`Format(Date, \"ggge\u5e74mm\u6708dd\u65e5\")`\u3067\u300cR6\u5e7407\u670810\u65e5\u300d\u5f62\u5f0f\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. 2\u3064\u306e\u65e5\u4ed8\u306e\u5dee\uff08\u65e5\u6570\uff09\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `DateDiff`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`DateDiff(\"d\", startDate, endDate)`\u3067\u65e5\u6570\u5dee\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u6708\u6570\u5dee\u306f`\"m\"`\u3001\u5e74\u6570\u5dee\u306f`\"yyyy\"`\u3092\u5f15\u6570\u306b\u4f7f\u3044\u307e\u3059\u3002\u307e\u305f\u3001Date\u578b\u540c\u58eb\u306e\u5f15\u304d\u7b97\uff08`endDate - startDate`\uff09\u3067\u3082\u65e5\u6570\u5dee\u304c\u6570\u5024\u3068\u3057\u3066\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067\u6708\u672b\u65e5\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `DateSerial(Year, Month + 1, 0)`\u3092\u4f7f\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u4eca\u6708\u306e\u6708\u672b\u65e5\u306f`DateSerial(Year(Date), Month(Date) + 1, 0)`\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u300c\u6708\u306b0\u3092\u6e21\u3059\u3068\u524d\u6708\u672b\u65e5\u300d\u3068\u3044\u3046DateSerial\u306e\u4ed5\u69d8\u3092\u5229\u7528\u3057\u305f\u30c6\u30af\u30cb\u30c3\u30af\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. \u30bb\u30eb\u306b\u5165\u529b\u3055\u308c\u305f\u5024\u304c\u6709\u52b9\u306a\u65e5\u4ed8\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `IsDate`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`If IsDate(cellValue) Then`\u3067True\u306e\u5834\u5408\u306e\u307f`CDate(cellValue)`\u3067Date\u578b\u306b\u5909\u63db\u3057\u307e\u3059\u3002IsDate\u30c1\u30a7\u30c3\u30af\u306a\u3057\u306bCDate\u3092\u547c\u3076\u3068\u3001\u7121\u52b9\u306a\u5024\u304c\u5165\u3063\u3066\u3044\u305f\u5834\u5408\u306b\u5b9f\u884c\u6642\u30a8\u30e9\u30fc13\uff08\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff09\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067DateAdd\u95a2\u6570\u3092\u4f7f\u3063\u30661\u30f6\u6708\u5f8c\u3092\u53d6\u5f97\u3059\u308b\u3068\u4f55\u6708\u306b\u306a\u308a\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. `DateAdd(\"m\", 1, baseDate)`\u30671\u30f6\u6708\u5f8c\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u6708\u672b\u51e6\u7406\u3082\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u307e\u3059\uff081\u670831\u65e5\u306e1\u30f6\u6708\u5f8c\u306f2\u670829\u65e5\u307e\u305f\u306f28\u65e5\u306b\u4e38\u3081\u3089\u308c\u308b\uff09\u3002\u5e74\u30fb\u9031\u30fb\u65e5\u30fb\u6642\u9593\u306e\u52a0\u7b97\u3082\u540c\u69d8\u306binterval\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5909\u3048\u308b\u3060\u3051\u3067\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u30de\u30af\u30ed\u3092\u81ea\u5206\u3067\u66f8\u3051\u306a\u3044\u304cAI\u3067\u4f5c\u308c\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u306f\u3044\u3001Claude Code\u306b\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u3067\u3001\u65e5\u4ed8\u51e6\u7406\u3092\u542b\u3080\u5b9f\u7528\u7684\u306aVBA\u30de\u30af\u30ed\u304c\u751f\u6210\u3067\u304d\u307e\u3059\u3002\u300cSheet1\u306eA\u5217\u306e\u65e5\u4ed8\u3092\u8aad\u3093\u3067\u3001\u4eca\u65e5\u304b\u308930\u65e5\u4ee5\u5185\u306e\u884c\u3092\u9ec4\u8272\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3059\u308b\u30de\u30af\u30ed\u300d\u306e\u3088\u3046\u306b\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`Date`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`Dim today As Date: today = Date`\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\uff08\u6642\u523b\u306a\u3057\uff09\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u73fe\u5728\u306e\u65e5\u6642\uff08\u6642\u523b\u542b\u3080\uff09\u306f`Now`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u5e74\u6708\u65e5\u3092\u500b\u5225\u306b\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f`Year(Date)`\u30fb`Month(Date)`\u30fb`Day(Date)`\u95a2\u6570\u304c\u4fbf\u5229\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067\u65e5\u4ed8\u3092yyyy\/mm\/dd\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`Format`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`Format(Date, \\\"yyyy\/mm\/dd\\\")`\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u304c\u300c2024\/07\/10\u300d\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u306b\u306a\u308a\u307e\u3059\u3002\u548c\u66a6\u306b\u3059\u308b\u5834\u5408\u306f`Format(Date, \\\"ggge\u5e74mm\u6708dd\u65e5\\\")`\u3067\u300cR6\u5e7407\u670810\u65e5\u300d\u5f62\u5f0f\u306b\u306a\u308a\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"2\u3064\u306e\u65e5\u4ed8\u306e\u5dee\uff08\u65e5\u6570\uff09\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`DateDiff`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`DateDiff(\\\"d\\\", startDate, endDate)`\u3067\u65e5\u6570\u5dee\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u6708\u6570\u5dee\u306f`\\\"m\\\"`\u3001\u5e74\u6570\u5dee\u306f`\\\"yyyy\\\"`\u3092\u5f15\u6570\u306b\u4f7f\u3044\u307e\u3059\u3002\u307e\u305f\u3001Date\u578b\u540c\u58eb\u306e\u5f15\u304d\u7b97\uff08`endDate - startDate`\uff09\u3067\u3082\u65e5\u6570\u5dee\u304c\u6570\u5024\u3068\u3057\u3066\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067\u6708\u672b\u65e5\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`DateSerial(Year, Month + 1, 0)`\u3092\u4f7f\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u4eca\u6708\u306e\u6708\u672b\u65e5\u306f`DateSerial(Year(Date), Month(Date) + 1, 0)`\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u300c\u6708\u306b0\u3092\u6e21\u3059\u3068\u524d\u6708\u672b\u65e5\u300d\u3068\u3044\u3046DateSerial\u306e\u4ed5\u69d8\u3092\u5229\u7528\u3057\u305f\u30c6\u30af\u30cb\u30c3\u30af\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"\u30bb\u30eb\u306b\u5165\u529b\u3055\u308c\u305f\u5024\u304c\u6709\u52b9\u306a\u65e5\u4ed8\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`IsDate`\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002`If IsDate(cellValue) Then`\u3067True\u306e\u5834\u5408\u306e\u307f`CDate(cellValue)`\u3067Date\u578b\u306b\u5909\u63db\u3057\u307e\u3059\u3002IsDate\u30c1\u30a7\u30c3\u30af\u306a\u3057\u306bCDate\u3092\u547c\u3076\u3068\u3001\u7121\u52b9\u306a\u5024\u304c\u5165\u3063\u3066\u3044\u305f\u5834\u5408\u306b\u5b9f\u884c\u6642\u30a8\u30e9\u30fc13\uff08\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff09\u304c\u767a\u751f\u3057\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067DateAdd\u95a2\u6570\u3092\u4f7f\u3063\u30661\u30f6\u6708\u5f8c\u3092\u53d6\u5f97\u3059\u308b\u3068\u4f55\u6708\u306b\u306a\u308a\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"`DateAdd(\\\"m\\\", 1, baseDate)`\u30671\u30f6\u6708\u5f8c\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u6708\u672b\u51e6\u7406\u3082\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u307e\u3059\uff081\u670831\u65e5\u306e1\u30f6\u6708\u5f8c\u306f2\u670829\u65e5\u307e\u305f\u306f28\u65e5\u306b\u4e38\u3081\u3089\u308c\u308b\uff09\u3002\u5e74\u30fb\u9031\u30fb\u65e5\u30fb\u6642\u9593\u306e\u52a0\u7b97\u3082\u540c\u69d8\u306binterval\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5909\u3048\u308b\u3060\u3051\u3067\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u30de\u30af\u30ed\u3092\u81ea\u5206\u3067\u66f8\u3051\u306a\u3044\u304cAI\u3067\u4f5c\u308c\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u306f\u3044\u3001Claude Code\u306b\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u3067\u3001\u65e5\u4ed8\u51e6\u7406\u3092\u542b\u3080\u5b9f\u7528\u7684\u306aVBA\u30de\u30af\u30ed\u304c\u751f\u6210\u3067\u304d\u307e\u3059\u3002\u300cSheet1\u306eA\u5217\u306e\u65e5\u4ed8\u3092\u8aad\u3093\u3067\u3001\u4eca\u65e5\u304b\u308930\u65e5\u4ee5\u5185\u306e\u884c\u3092\u9ec4\u8272\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3059\u308b\u30de\u30af\u30ed\u300d\u306e\u3088\u3046\u306b\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9 01VBA\u306eDate\u578b\u3068\u306f\uff1f\u57fa\u790e\u77e5\u8b58 02\u4eca\u65e5\u306e\u65e5\u4ed8\u30fb\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5 03Format\u95a2\u6570\u3067\u65e5\u4ed8\u3092\u66f8\u5f0f\u5909\u63db\u3059\u308b 04\u65e5\u4ed8\u306e\u6bd4\u8f03\u30fb\u5927\u5c0f\u5224\u5b9a 05DateAdd\u30fbDateDiff\u95a2\u6570\u3067\u65e5\u4ed8\u8a08\u7b97 06I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14988,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"ExcelVBA\u306e\u65e5\u4ed8\u51e6\u7406\u3092\u5b8c\u5168\u89e3\u8aac\u3002Date\u578b\u30fbNow\u30fbFormat\u95a2\u6570\u30fbDateAdd\u30fbDateDiff\u30fbIsDate\u30fbCDate\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3068\u5b9f\u4f8b\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3002AI\u696d\u52d9\u81ea\u52d5\u5316\u3068\u306e\u9023\u643a\u3067VBA\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5\u3082\u7d39\u4ecb\u3002","rank_math_focus_keyword":"VBA \u65e5\u4ed8 \u53d6\u5f97","rank_math_title":"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA\u65e5\u4ed8\u306e\u53d6\u5f97\u30fb\u66f8\u5f0f\u5909\u63db\u30fb\u6bd4\u8f03\u30fb\u8a08\u7b97\u3092\u5b8c\u5168\u89e3\u8aac\uff01\u696d\u52d9\u81ea\u52d5\u5316\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u65b9\u3082\u7d39\u4ecb","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[3],"tags":[],"class_list":["post-14989","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-automation"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/14989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/comments?post=14989"}],"version-history":[{"count":1,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/14989\/revisions"}],"predecessor-version":[{"id":14990,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/14989\/revisions\/14990"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/14988"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=14989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=14989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=14989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}