{"id":17806,"date":"2026-07-18T06:18:41","date_gmt":"2026-07-17T21:18:41","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=17806"},"modified":"2026-09-01T15:15:39","modified_gmt":"2026-09-01T06:15:39","slug":"cc-vba-if","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-if\/","title":{"rendered":"\u30102026\u5e748\u6708\u6700\u65b0\u3011VBA\u306eIf\u6587\u5b8c\u5168\u30ac\u30a4\u30c9\uff5cElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fbClaude Code\u3067\u81ea\u52d5\u751f\u6210\u307e\u3067"},"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-if.jpg\" alt=\"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA\u306eIf\u6587\u5b8c\u5168\u30ac\u30a4\u30c9\uff5cElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fbClaude Code\u3067\u81ea\u52d5\u751f\u6210\u307e\u3067\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u3067Excel\u3092\u81ea\u52d5\u5316\u3059\u308b\u969b\u3001\u5fc5\u305a\u5fc5\u8981\u306b\u306a\u308b\u306e\u304c\u300c\u6761\u4ef6\u5206\u5c90\u300d\u3067\u3059\u3002\u300c\u30bb\u30eb\u306e\u5024\u304c100\u4ee5\u4e0a\u306a\u3089A\u3001\u672a\u6e80\u306a\u3089B\u300d\u300c\u62c5\u5f53\u8005\u304c\u5c71\u7530\u3055\u3093\u306a\u3089\u6771\u65e5\u672c\u62c5\u5f53\u306b\u632f\u308a\u5206\u3051\u308b\u300d\u2014\u2014\u3053\u3046\u3057\u305f\u51e6\u7406\u3092VBA\u3067\u5b9f\u73fe\u3059\u308b\u306e\u304c<strong>If\u6587<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eIf\u6587\u306f\u898b\u305f\u76ee\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u304c\u3001ElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50\u306a\u3069\u3001\u899a\u3048\u308b\u3079\u304d\u3053\u3068\u304c\u591a\u304f\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u6761\u4ef6\u304c\u591a\u304f\u306a\u308b\u3068If\u6587\u3088\u308aSelect Case\u306e\u65b9\u304c\u9069\u5207\u306a\u5834\u9762\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f<strong>VBA\u306eIf\u6587\u306b\u95a2\u3059\u308b\u5168\u77e5\u8b58\u3092\u4f53\u7cfb\u7684\u306b\u89e3\u8aac<\/strong>\u3057\u307e\u3059\u3002\u3055\u3089\u306b2026\u5e74\u73fe\u5728\u306e\u5b9f\u52d9\u7684\u306a\u8996\u70b9\u3068\u3057\u3066\u3001<strong>Claude Code\u3092\u4f7f\u3063\u3066VBA\u306e\u6761\u4ef6\u5206\u5c90\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/strong>\u3082\u8a73\u3057\u304f\u7d39\u4ecb\u3057\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\">\u79c1\u305f\u3061GENAI\u304c\u652f\u63f4\u3059\u308b\u4f01\u696d\u306e\u591a\u304f\u3067\u3001\u300cExcel\u306eVBA\u3092\u66f8\u304d\u305f\u3044\u304c\u3001If\u6587\u306e\u66f8\u304d\u65b9\u304c\u5206\u304b\u3089\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u300d\u3068\u3044\u3046\u58f0\u3092\u805e\u304d\u307e\u3059\u3002VBA\u306f\u4e00\u5ea6\u66f8\u3051\u3070\u8cc7\u7523\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u6761\u4ef6\u5206\u5c90\u306e\u66f8\u304d\u65b9\u3092\u8aa4\u308b\u3068\u30d0\u30b0\u304c\u8d77\u304d\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067If\u6587\u306e\u5168\u30d1\u30bf\u30fc\u30f3\u3092\u62bc\u3055\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u5206\u304b\u308b\u3053\u3068\uff1a<\/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>VBA\u306eIf\u6587\u306e<strong>\u57fa\u672c\u69cb\u65874\u30d1\u30bf\u30fc\u30f3<\/strong>\uff08\u5358\u884c\u30fb\u30d6\u30ed\u30c3\u30af\u30fbElse\u4ed8\u304d\u30fbElseIf\uff09<\/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>And\u30fbOr\u30fbNot\u8ad6\u7406\u6f14\u7b97\u5b50<\/strong>\u3092\u4f7f\u3063\u305f\u8907\u5408\u6761\u4ef6\u306e\u66f8\u304d\u65b9<\/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>Like\u30fbIs\u6f14\u7b97\u5b50<\/strong>\u3092\u4f7f\u3063\u305f\u6587\u5b57\u5217\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u30fb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6bd4\u8f03<\/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>\u30cd\u30b9\u30c8\uff08\u5165\u308c\u5b50\uff09\u306eIf\u6587<\/strong>\u306e\u66f8\u304d\u65b9\u3068\u53ef\u8aad\u6027\u3092\u4fdd\u3064\u30b3\u30c4<\/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>If\u6587\u3068Select Case\u306e\u4f7f\u3044\u5206\u3051<\/strong>\u306e\u5224\u65ad\u57fa\u6e96<\/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\u3067VBA\u306eIf\u6587\u3092\u81ea\u52d5\u751f\u6210<\/strong>\u3059\u308b\u5b9f\u8df5\u7684\u306a\u65b9\u6cd5<\/span><\/div>\n\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">VBA IF BASICS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">VBA\u306eIf\u6587\u3068\u306f\uff1f\u6761\u4ef6\u5206\u5c90\u306e\u57fa\u672c\u3092\u7406\u89e3\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u6761\u4ef6\u304c\u771f(True)\u304b\u507d(False)\u304b\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u5206\u5c90\u3055\u305b\u308b\u6700\u91cd\u8981\u69cb\u6587<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eIf\u6587\u306f\u3001\u6307\u5b9a\u3057\u305f<strong>\u6761\u4ef6\u304c\u771f\uff08True\uff09\u306e\u5834\u5408\u3068\u507d\uff08False\uff09\u306e\u5834\u5408\u3067\u3001\u5b9f\u884c\u3059\u308b\u51e6\u7406\u3092\u5207\u308a\u66ff\u3048\u308b\u69cb\u6587<\/strong>\u3067\u3059\u3002Excel VBA\u306e\u30de\u30af\u30ed\u3092\u4f5c\u308b\u4e0a\u3067\u6700\u3082\u983b\u7e41\u306b\u4f7f\u3046\u69cb\u6587\u306e\u4e00\u3064\u3067\u3042\u308a\u3001\u6761\u4ef6\u5206\u5c90\u306a\u3057\u3067\u5b9f\u7528\u7684\u306a\u30de\u30af\u30ed\u3092\u4f5c\u308b\u3053\u3068\u306f\u307b\u307c\u4e0d\u53ef\u80fd\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>If\u6587\uff08\u6761\u4ef6\u5206\u5c90\uff09<\/strong>\uff1aVBA\u306e\u5236\u5fa1\u69cb\u9020\u306e\u4e00\u3064\u3002\u300c\u3082\u3057\u3007\u3007\u306a\u3089A\u3092\u5b9f\u884c\u3057\u3001\u305d\u3046\u3067\u306a\u3051\u308c\u3070B\u3092\u5b9f\u884c\u3059\u308b\u300d\u3068\u3044\u3046\u51e6\u7406\u306e\u5206\u5c90\u3092\u5b9f\u73fe\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5168\u822c\u306e\u57fa\u790e\u3067\u3042\u308a\u3001VBA\u306b\u9650\u3089\u305aPython\u30fbJavaScript\u30fbC#\u306a\u3069\u5168\u3066\u306e\u8a00\u8a9e\u306b\u540c\u69d8\u306e\u69cb\u6587\u304c\u3042\u308b\u3002VBA\u3067\u306f\u300cIf \u6761\u4ef6 Then \u51e6\u7406 End If\u300d\u306e\u5f62\u3067\u66f8\u304f\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If\u6587\u304c\u4f7f\u308f\u308c\u308b\u4ee3\u8868\u7684\u306a\u696d\u52d9\u30b7\u30fc\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u696d\u52d9\u30b7\u30fc\u30f3<\/th><th>\u6761\u4ef6\u306e\u4f8b<\/th><th>If\u6587\u306e\u51e6\u7406\u5185\u5bb9<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u58f2\u4e0a\u30c7\u30fc\u30bf\u306e\u8a55\u4fa1<\/td><td>\u58f2\u4e0a >= 1000000<\/td><td>\u300c\u9054\u6210\u300d\u3068\u8868\u793a\u3059\u308b<\/td><\/tr>\n<tr><td>\u793e\u54e1\u540d\u7c3f\u306e\u632f\u308a\u5206\u3051<\/td><td>\u90e8\u7f72 = \"\u55b6\u696d\u90e8\"<\/td><td>\u5225\u30b7\u30fc\u30c8\u306b\u30b3\u30d4\u30fc\u3059\u308b<\/td><\/tr>\n<tr><td>\u5728\u5eab\u7ba1\u7406<\/td><td>\u5728\u5eab\u6570 < 10<\/td><td>\u8b66\u544a\u30bb\u30eb\u3092\u8d64\u304f\u5857\u308a\u3064\u3076\u3059<\/td><\/tr>\n<tr><td>\u8acb\u6c42\u66f8\u51e6\u7406<\/td><td>\u652f\u6255\u671f\u9650 < Date()<\/td><td>\u300c\u671f\u9650\u8d85\u904e\u300d\u30d5\u30e9\u30b0\u3092\u7acb\u3066\u308b<\/td><\/tr>\n<tr><td>\u6210\u7e3e\u7ba1\u7406<\/td><td>\u5f97\u70b9 >= 80<\/td><td>\u300c\u5408\u683c\u300d\u300160\u301c79\u306f\u300c\u6761\u4ef6\u4ed8\u304d\u300d\u3001\u672a\u6e80\u306f\u300c\u4e0d\u5408\u683c\u300d<\/td><\/tr>\n<\/tbody>\n<\/table>\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\">If\u6587\u3092\u4f7f\u3044\u3053\u306a\u305b\u308b\u3068\u3001\u624b\u4f5c\u696d\u3067\u3084\u3063\u3066\u3044\u305fExcel\u306e\u30c7\u30fc\u30bf\u6574\u7406\u30fb\u4ed5\u5206\u3051\u30fb\u30c1\u30a7\u30c3\u30af\u4f5c\u696d\u3092\u5927\u5e45\u306b\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002\u7279\u306b\u300c\u4e00\u5b9a\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u305f\u30bb\u30eb\u306b\u8272\u3092\u5857\u308b\u300d\u300c\u6761\u4ef6\u306b\u3088\u3063\u3066\u5225\u30b7\u30fc\u30c8\u306b\u632f\u308a\u5206\u3051\u308b\u300d\u3068\u3044\u3046\u51e6\u7406\u306f\u3001VBA\u306eIf\u6587\u306e\u5b9a\u756a\u6d3b\u7528\u4f8b\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">IF THEN ELSE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">If-Then-Else\u6587\u306e\u66f8\u304d\u65b9\u30684\u3064\u306e\u57fa\u672c\u30d1\u30bf\u30fc\u30f3<\/span>\n  <span class=\"section-desc\">\u5358\u884cIf\u30fb\u30d6\u30ed\u30c3\u30afIf\u30fbElse\u4ed8\u304d\u30fb\u8907\u6570Else\u306e4\u30d1\u30bf\u30fc\u30f3\u3092\u5b8c\u5168\u89e3\u8aac<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eIf\u6587\u306b\u306f<strong>4\u3064\u306e\u57fa\u672c\u30d1\u30bf\u30fc\u30f3<\/strong>\u304c\u3042\u308a\u307e\u3059\u3002\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u304c\u3001\u8aad\u307f\u3084\u3059\u304f\u4fdd\u5b88\u3057\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2-1. \u30d1\u30bf\u30fc\u30f3\u2460\uff1a\u5358\u884cIf\u6587\uff081\u884c\u3067\u5b8c\u7d50\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306aIf\u6587\u306e\u66f8\u304d\u65b9\u3067\u3059\u3002\u6761\u4ef6\u3068\u51e6\u7406\u30921\u884c\u306b\u66f8\u3051\u307e\u3059\u3002\u51e6\u7406\u304c1\u3064\u3060\u3051\u3067\u5358\u7d14\u306a\u5834\u5408\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a\u306a\u3089\u300c\u9054\u6210\u300d\u3068\u8868\u793a\nIf Cells(2, 1).Value >= 1000000 Then MsgBox \"\u9054\u6210\"<\/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;\"><span style=\"font-size:18px;\">&#128161;<\/span><strong style=\"color:#16a34a;font-size:15px;\">\u5358\u884cIf\u6587\u306fEnd If\u304c\u4e0d\u8981<\/strong><\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u5358\u884c\u3067\u66f8\u304fIf\u6587\uff081\u884c\u3067\u300cIf \u6761\u4ef6 Then \u51e6\u7406\u300d\u307e\u3067\u66f8\u304f\u5f62\uff09\u306e\u5834\u5408\u306f\u3001End If\u306f\u66f8\u304d\u307e\u305b\u3093\u3002\u9006\u306b\u3001\u30d6\u30ed\u30c3\u30af\u5f62\u5f0f\uff08Then\u306e\u5f8c\u3067\u6539\u884c\u3059\u308b\u5f62\uff09\u306e\u5834\u5408\u306f\u5fc5\u305aEnd If\u304c\u5fc5\u8981\u3067\u3059\u3002End If\u3092\u5fd8\u308c\u308b\u3068\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-2. \u30d1\u30bf\u30fc\u30f3\u2461\uff1a\u30d6\u30ed\u30c3\u30afIf\u6587\uff08\u8907\u6570\u884c\u306e\u51e6\u7406\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u51e6\u7406\u304c\u8907\u6570\u884c\u306b\u308f\u305f\u308b\u5834\u5408\u306f\u3001\u30d6\u30ed\u30c3\u30af\u5f62\u5f0f\u3067\u66f8\u304d\u307e\u3059\u3002\u300cIf \u6761\u4ef6 Then\u300d\u306e\u5f8c\u306b\u6539\u884c\u3057\u3001\u51e6\u7406\u3092\u66f8\u304d\u3001\u300cEnd If\u300d\u3067\u9589\u3058\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">If Cells(2, 1).Value >= 1000000 Then\n    ' \u6761\u4ef6\u304c\u771f\u306e\u5834\u5408\u306e\u51e6\u7406\uff08\u8907\u6570\u66f8\u3051\u308b\uff09\n    Cells(2, 2).Value = \"\u9054\u6210\"\n    Cells(2, 2).Interior.Color = RGB(0, 255, 0)\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-3. \u30d1\u30bf\u30fc\u30f3\u2462\uff1aIf-Else\u6587\uff082\u5206\u5c90\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6761\u4ef6\u304c\u771f\u306e\u6642\u3068\u507d\u306e\u6642\u3067\u3001\u305d\u308c\u305e\u308c\u5225\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306b\u4f7f\u3044\u307e\u3059\u3002Else\u306e\u30d6\u30ed\u30c3\u30af\u306b\u306f\u300c\u6761\u4ef6\u304c\u507d\uff08False\uff09\u306e\u5834\u5408\u306e\u51e6\u7406\u300d\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">If Cells(2, 1).Value >= 1000000 Then\n    Cells(2, 2).Value = \"\u9054\u6210\"\n    Cells(2, 2).Interior.Color = RGB(0, 255, 0)\nElse\n    Cells(2, 2).Value = \"\u672a\u9054\"\n    Cells(2, 2).Interior.Color = RGB(255, 0, 0)\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-4. \u30d1\u30bf\u30fc\u30f3\u2463\uff1aIf\u6587\u306e\u7701\u7565\u5f62\uff08IIf\u95a2\u6570\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306b\u306f\u300cIIf\u95a2\u6570\u300d\u3068\u3044\u30461\u884c\u3067\u6761\u4ef6\u5206\u5c90\u306e\u5024\u3092\u8fd4\u3059\u95a2\u6570\u3082\u3042\u308a\u307e\u3059\u3002\u300cIIf(\u6761\u4ef6, \u771f\u306e\u5024, \u507d\u306e\u5024)\u300d\u3068\u3044\u3046\u5f62\u3067\u66f8\u304d\u307e\u3059\u3002Python\u306e\u4e09\u9805\u6f14\u7b97\u5b50\u3084\u3001Excel\u306eif\u95a2\u6570\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001IIf\u95a2\u6570\u306f\u4e21\u65b9\u306e\u5024\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u3084\u3059\u3044\u5834\u5408\u306f\u30d6\u30ed\u30c3\u30afIf\u6587\u3092\u4f7f\u3046\u65b9\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' IIf\u95a2\u6570\u3067\u6761\u4ef6\u5206\u5c90\nDim result As String\nresult = IIf(Cells(2, 1).Value >= 1000000, \"\u9054\u6210\", \"\u672a\u9054\")\nCells(2, 2).Value = result<\/pre>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u30d1\u30bf\u30fc\u30f3<\/th><th>\u66f8\u304d\u65b9<\/th><th>End If\u304c\u5fc5\u8981\u304b<\/th><th>\u5411\u3044\u3066\u3044\u308b\u30b1\u30fc\u30b9<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u5358\u884cIf<\/td><td>If \u6761\u4ef6 Then \u51e6\u7406<\/td><td>\u274c \u4e0d\u8981<\/td><td>\u51e6\u7406\u304c1\u3064\u30fb\u30b7\u30f3\u30d7\u30eb\u306a\u5834\u5408<\/td><\/tr>\n<tr><td>\u30d6\u30ed\u30c3\u30afIf<\/td><td>If \u6761\u4ef6 Then\u6539\u884c \u51e6\u7406 End If<\/td><td>\u2705 \u5fc5\u9808<\/td><td>\u51e6\u7406\u304c\u8907\u6570\u884c\u3042\u308b\u5834\u5408<\/td><\/tr>\n<tr><td>If-Else<\/td><td>If \u6761\u4ef6 Then \u51e6\u7406A Else \u51e6\u7406B End If<\/td><td>\u2705 \u5fc5\u9808<\/td><td>\u771f\u30fb\u507d\u3067\u5225\u3005\u306e\u51e6\u7406\u304c\u3042\u308b\u5834\u5408<\/td><\/tr>\n<tr><td>IIf\u95a2\u6570<\/td><td>IIf(\u6761\u4ef6, \u771f\u306e\u5024, \u507d\u306e\u5024)<\/td><td>\u274c \u4e0d\u8981\uff08\u95a2\u6570\uff09<\/td><td>\u5024\u3092\u8fd4\u30591\u884c\u51e6\u7406\u306b\u9650\u5b9a<\/td><\/tr>\n<\/tbody>\n<\/table>\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">ELSEIF MULTI<\/span>\n  <span class=\"section-title\" style=\"display:block;\">ElseIf\u6587\u3067\u591a\u6bb5\u5206\u5c90\u3092\u4f5c\u308b\u65b9\u6cd5<\/span>\n  <span class=\"section-desc\">3\u3064\u4ee5\u4e0a\u306e\u6761\u4ef6\u3092\u9806\u756a\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308bElseIf\u306e\u4f7f\u3044\u65b9\u3092\u5b9f\u4f8b\u3067\u89e3\u8aac<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6761\u4ef6\u304c3\u3064\u4ee5\u4e0a\u3042\u308b\u5834\u5408\u3001<strong>ElseIf\u3092\u4f7f\u3063\u3066\u8907\u6570\u306e\u6761\u4ef6\u3092\u9806\u756a\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u591a\u6bb5\u5206\u5c90<\/strong>\u304c\u4f5c\u308c\u307e\u3059\u3002\u300c\u3082\u3057\u3007\u3007\u306a\u3089A\u3001\u305d\u3046\u3067\u306a\u304f\u25b3\u25b3\u306a\u3089B\u3001\u305d\u308c\u4ee5\u5916\u306a\u3089C\u300d\u3068\u3044\u3046\u51e6\u7406\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>ElseIf\uff08\u591a\u6bb5\u5206\u5c90\uff09<\/strong>\uff1aVBA\u306eIf\u6587\u306e\u4e2d\u3067\u8907\u6570\u306e\u6761\u4ef6\u3092\u8ffd\u52a0\u3059\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\u3002\u300cIf \u6761\u4ef61 Then \u51e6\u74061 ElseIf \u6761\u4ef62 Then \u51e6\u74062 Else \u51e6\u74063 End If\u300d\u306e\u5f62\u3067\u4f7f\u3046\u3002\u6761\u4ef6\u306f\u4e0a\u304b\u3089\u9806\u306b\u8a55\u4fa1\u3055\u308c\u3001\u6700\u521d\u306bTrue\u306b\u306a\u3063\u305f\u6761\u4ef6\u306e\u51e6\u7406\u3060\u3051\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\u305d\u308c\u4ee5\u964d\u306e\u6761\u4ef6\u306f\u8a55\u4fa1\u3055\u308c\u306a\u3044\uff08\u30b7\u30e7\u30fc\u30c8\u30b5\u30fc\u30ad\u30c3\u30c8\uff09\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u6210\u7e3e\u8a55\u4fa1\u306e\u5177\u4f53\u4f8b\u3067\u3059\u300290\u70b9\u4ee5\u4e0a\u2192S\u8a55\u4fa1\u300180\u70b9\u4ee5\u4e0a\u2192A\u8a55\u4fa1\u300170\u70b9\u4ee5\u4e0a\u2192B\u8a55\u4fa1\u3001\u305d\u308c\u672a\u6e80\u2192C\u8a55\u4fa1\u3068\u3044\u3046\u51e6\u7406\u3092ElseIf\u3067\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">Dim score As Integer\nDim grade As String\nscore = Cells(2, 1).Value\n\nIf score >= 90 Then\n    grade = \"S\"\nElseIf score >= 80 Then\n    grade = \"A\"\nElseIf score >= 70 Then\n    grade = \"B\"\nElse\n    grade = \"C\"\nEnd If\n\nCells(2, 2).Value = grade<\/pre>\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;\"><span style=\"font-size:20px;\">&#9888;&#65039;<\/span><strong style=\"color:#dc2626;font-size:16px;\">ElseIf\u306f\u9806\u756a\u304c\u91cd\u8981<\/strong><\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">ElseIf\u306f\u6761\u4ef6\u3092\u4e0a\u304b\u3089\u9806\u306b\u8a55\u4fa1\u3057\u3001\u6700\u521d\u306bTrue\u306b\u306a\u3063\u305f\u7b87\u6240\u3067\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u6b8b\u308a\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u300cscore >= 90\u300d\u300cscore >= 80\u300d\u306e\u3088\u3046\u306b\u66f8\u304f\u5834\u5408\u3001\u5fc5\u305a\u5927\u304d\u3044\u6570\u5024\u306e\u6761\u4ef6\u3092\u4e0a\u306b\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3057\u300cscore >= 70\u300d\u3092\u4e00\u756a\u4e0a\u306b\u66f8\u304f\u3068\u300170\u70b9\u4ee5\u4e0a\u306a\u3089\u5168\u3066B\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\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\">ElseIf\u306e\u500b\u6570\u306b\u306f\u5236\u9650\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u6761\u4ef6\u304c5\u3064\u4ee5\u4e0a\u306b\u306a\u308b\u3068\u8aad\u307f\u306b\u304f\u304f\u306a\u308b\u305f\u3081\u30016\u3064\u4ee5\u4e0a\u306e\u5206\u5c90\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fSelect Case\u6587\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u5f8c\u8ff0\u3057\u307e\u3059\uff09\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">LOGICAL OPERATORS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u8ad6\u7406\u6f14\u7b97\u5b50\uff08And\u30fbOr\u30fbNot\uff09\u306e\u4f7f\u3044\u65b9<\/span>\n  <span class=\"section-desc\">\u8907\u6570\u306e\u6761\u4ef6\u3092\u7d44\u307f\u5408\u308f\u305b\u308b3\u7a2e\u985e\u306e\u6f14\u7b97\u5b50\u3092\u5b9f\u4f8b\u3067\u5b8c\u5168\u89e3\u8aac<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u52d9\u3067\u306f\u300c\u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a \u304b\u3064 \u9054\u6210\u7387\u304c90%\u4ee5\u4e0a\u300d\u306e\u3088\u3046\u306b\u3001<strong>\u8907\u6570\u306e\u6761\u4ef6\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u5206\u5c90<\/strong>\u304c\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002VBA\u3067\u306f\u8ad6\u7406\u6f14\u7b97\u5b50\uff08And\u30fbOr\u30fbNot\uff09\u3092\u4f7f\u3063\u3066\u8907\u6570\u306e\u6761\u4ef6\u3092\u4e00\u3064\u306eIf\u6587\u3067\u8868\u73fe\u3067\u304d\u307e\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>\u8ad6\u7406\u6f14\u7b97\u5b50\uff08And\u30fbOr\u30fbNot\uff09<\/strong>\uff1aIf\u6587\u306e\u6761\u4ef6\u5f0f\u3067\u8907\u6570\u306e\u6761\u4ef6\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u305f\u3081\u306e\u6f14\u7b97\u5b50\u3002And\uff08A\u304b\u3064B\uff09\u30fbOr\uff08A\u307e\u305f\u306fB\uff09\u30fbNot\uff08\u301c\u3067\u306a\u3044\uff09\u306e3\u7a2e\u985e\u304c\u4e3b\u8981\u306a\u3082\u306e\u3002\u4f8b\uff1a\u300cIf score >= 80 And attendance >= 0.9 Then\u300d\u306f\u300c80\u70b9\u4ee5\u4e0a\u304b\u3064\u51fa\u5e2d\u738790%\u4ee5\u4e0a\u300d\u306e\u5834\u5408\u306e\u307fTrue\u306b\u306a\u308b\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-1. And\u6f14\u7b97\u5b50\uff08A\u304b\u3064B\u306e\u5834\u5408\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">And\u6f14\u7b97\u5b50\u306f\u300c\u6761\u4ef6A\u304c\u771f\u3001\u304b\u3064\u6761\u4ef6B\u3082\u771f\u300d\u306e\u5834\u5408\u306bTrue\u3092\u8fd4\u3057\u307e\u3059\u3002\u4e21\u65b9\u306e\u6761\u4ef6\u3092\u540c\u6642\u306b\u6e80\u305f\u3059\u30b1\u30fc\u30b9\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a \u304b\u3064 \u524d\u5e74\u6bd4\u304c100%\u4ee5\u4e0a\u306e\u307f\u9054\u6210\u3068\u5224\u5b9a\nIf Cells(2, 1).Value >= 1000000 And Cells(2, 2).Value >= 1 Then\n    Cells(2, 3).Value = \"\u30c0\u30d6\u30eb\u9054\u6210\"\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-2. Or\u6f14\u7b97\u5b50\uff08A\u307e\u305f\u306fB\u306e\u5834\u5408\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Or\u6f14\u7b97\u5b50\u306f\u300c\u6761\u4ef6A\u304c\u771f\u3001\u307e\u305f\u306f\u6761\u4ef6B\u304c\u771f\u300d\u306e\u5834\u5408\u306bTrue\u3092\u8fd4\u3057\u307e\u3059\u3002\u3069\u3061\u3089\u304b\u4e00\u65b9\u3067\u3082\u6e80\u305f\u305b\u3070\u3088\u3044\u30b1\u30fc\u30b9\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u90e8\u7f72\u304c\u55b6\u696d\u90e8\u300c\u307e\u305f\u306f\u300d\u8ca9\u58f2\u63a8\u9032\u90e8\u306e\u30bb\u30eb\u306b\u8272\u3092\u3064\u3051\u308b\nIf Cells(2, 1).Value = \"\u55b6\u696d\u90e8\" Or Cells(2, 1).Value = \"\u8ca9\u58f2\u63a8\u9032\u90e8\" Then\n    Cells(2, 1).Interior.Color = RGB(255, 255, 0)\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-3. Not\u6f14\u7b97\u5b50\uff08\u301c\u3067\u306a\u3044\u5834\u5408\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not\u6f14\u7b97\u5b50\u306f\u6761\u4ef6\u306e\u771f\u507d\u3092\u53cd\u8ee2\u3057\u307e\u3059\u3002\u300c\u301c\u3067\u306a\u3044\u5834\u5408\u306b\u51e6\u7406\u3092\u3059\u308b\u300d\u3068\u3044\u3046\u66f8\u304d\u65b9\u304c\u5fc5\u8981\u306a\u6642\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u300c\u5b8c\u4e86\u300d\u3067\u306f\u306a\u3044\u884c\u3060\u3051\u51e6\u7406\u3059\u308b\nIf Not Cells(2, 3).Value = \"\u5b8c\u4e86\" Then\n    ' \u672a\u5b8c\u4e86\u306e\u884c\u306b\u9ec4\u8272\u3092\u4ed8\u3051\u308b\n    Rows(2).Interior.Color = RGB(255, 255, 0)\nEnd If<\/pre>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u8ad6\u7406\u6f14\u7b97\u5b50<\/th><th>\u8aad\u307f\u65b9<\/th><th>\u771f(True)\u306b\u306a\u308b\u6761\u4ef6<\/th><th>\u4f8b<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>And<\/td><td>\u304b\u3064<\/td><td>\u6761\u4ef6A\u30fb\u6761\u4ef6B\u304c\u4e21\u65b9True<\/td><td>A >= 100 And B >= 50 \u2192 \u4e21\u65b9\u6e80\u305f\u3059\u6642True<\/td><\/tr>\n<tr><td>Or<\/td><td>\u307e\u305f\u306f<\/td><td>\u6761\u4ef6A\u30fb\u6761\u4ef6B\u306e\u5c11\u306a\u304f\u3068\u3082\u4e00\u65b9\u304cTrue<\/td><td>A = \"\u6771\u4eac\" Or A = \"\u5927\u962a\" \u2192 \u3069\u3061\u3089\u304b\u306e\u6642True<\/td><\/tr>\n<tr><td>Not<\/td><td>\u301c\u3067\u306a\u3044<\/td><td>\u6761\u4ef6\u304cFalse\u306e\u6642\u306bTrue<\/td><td>Not A = \"\u5b8c\u4e86\" \u2192 \u5b8c\u4e86\u4ee5\u5916\u306e\u6642True<\/td><\/tr>\n<tr><td>Xor<\/td><td>\u4e00\u65b9\u3060\u3051<\/td><td>\u6761\u4ef6A\u30fb\u6761\u4ef6B\u306e\u3069\u3061\u3089\u304b\u4e00\u65b9\u3060\u3051\u304cTrue<\/td><td>A Xor B \u2192 \u4e21\u65b9\u540c\u3058\u5024\u306e\u6642False\uff08\u3042\u307e\u308a\u4f7f\u308f\u306a\u3044\uff09<\/td><\/tr>\n<\/tbody>\n<\/table>\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\">\u79c1\u304c\u7d4c\u9a13\u3057\u305f\u6848\u4ef6\u3067\u3001And\u6f14\u7b97\u5b50\u3068Or\u6f14\u7b97\u5b50\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u8907\u96d1\u306a\u6761\u4ef6\u304c\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u3053\u3046\u3044\u3046\u8907\u96d1\u306a\u6761\u4ef6\u306e\u5834\u5408\u3001\u30ab\u30c3\u30b3()\u3067\u512a\u5148\u9806\u4f4d\u3092\u660e\u793a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u300cA And (B Or C)\u300d\u306e\u3088\u3046\u306b\u66f8\u304b\u306a\u3044\u3068\u3001\u610f\u56f3\u3068\u9055\u3046\u8a55\u4fa1\u9806\u5e8f\u306b\u306a\u308b\u3053\u3068\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">COMPARISON OPS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u6bd4\u8f03\u6f14\u7b97\u5b50\uff08Like\u30fbIs\uff09\u3068\u6587\u5b57\u5217\u30fb\u65e5\u4ed8\u306e\u6bd4\u8f03<\/span>\n  <span class=\"section-desc\">Like\u6f14\u7b97\u5b50\u306e\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u30fbIs\u6f14\u7b97\u5b50\u3067\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6bd4\u8f03\u3092\u89e3\u8aac<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eIf\u6587\u3067\u6761\u4ef6\u3092\u66f8\u304f\u969b\u3001\u6570\u5024\u306e\u5927\u5c0f\u6bd4\u8f03\uff08>=\u3001<=\u306a\u3069\uff09\u3060\u3051\u3067\u306a\u304f\u3001<strong>\u6587\u5b57\u5217\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\uff08Like\u6f14\u7b97\u5b50\uff09\u3084\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6bd4\u8f03\uff08Is\u6f14\u7b97\u5b50\uff09<\/strong>\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5-1. \u57fa\u672c\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u4e00\u89a7<\/h3>\n\n\n\n<table>\n<thead><tr><th>\u6f14\u7b97\u5b50<\/th><th>\u610f\u5473<\/th><th>\u4f7f\u7528\u4f8b<\/th><th>\u6ce8\u610f\u70b9<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>=<\/td><td>\u7b49\u3057\u3044<\/td><td>A = 100<\/td><td>\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u3067\u3082\u4f7f\u7528\u53ef<\/td><\/tr>\n<tr><td><><\/td><td>\u7b49\u3057\u304f\u306a\u3044<\/td><td>A <> \"\"<\/td><td>\u6587\u5b57\u5217\u306e\u300cNot equal\u300d\u306b\u4f7f\u3046<\/td><\/tr>\n<tr><td>><\/td><td>\u301c\u3088\u308a\u5927\u304d\u3044<\/td><td>A > 100<\/td><td>\u6570\u5024\u30fb\u65e5\u4ed8\u306b\u4f7f\u7528<\/td><\/tr>\n<tr><td>>=<\/td><td>\u301c\u4ee5\u4e0a<\/td><td>A >= 100<\/td><td>\u6570\u5024\u30fb\u65e5\u4ed8\u306b\u4f7f\u7528<\/td><\/tr>\n<tr><td><<\/td><td>\u301c\u3088\u308a\u5c0f\u3055\u3044<\/td><td>A < 100<\/td><td>\u6570\u5024\u30fb\u65e5\u4ed8\u306b\u4f7f\u7528<\/td><\/tr>\n<tr><td><=<\/td><td>\u301c\u4ee5\u4e0b<\/td><td>A <= 100<\/td><td>\u6570\u5024\u30fb\u65e5\u4ed8\u306b\u4f7f\u7528<\/td><\/tr>\n<tr><td>Like<\/td><td>\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1<\/td><td>A Like \"*\u5c71\u7530*\"<\/td><td>\u6587\u5b57\u5217\u306e\u307f\u3002\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u304c\u4f7f\u3048\u308b<\/td><\/tr>\n<tr><td>Is<\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u4e00<\/td><td>A Is Nothing<\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u306e\u6bd4\u8f03\u5c02\u7528<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<h3 class=\"wp-block-heading\">5-2. Like\u6f14\u7b97\u5b50\u3067\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0<\/h3>\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>Like\u6f14\u7b97\u5b50<\/strong>\uff1aVBA\u306e\u6587\u5b57\u5217\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u6f14\u7b97\u5b50\u3002\u300cA Like \u30d1\u30bf\u30fc\u30f3\u300d\u306e\u5f62\u3067\u4f7f\u3044\u3001\u6587\u5b57\u5217A\u304c\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3059\u308b\u5834\u5408\u306bTrue\u3092\u8fd4\u3059\u3002\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u300c*\u300d\uff080\u6587\u5b57\u4ee5\u4e0a\u306e\u4efb\u610f\u6587\u5b57\u5217\uff09\u3001\u300c?\u300d\uff081\u6587\u5b57\u306e\u4efb\u610f\u6587\u5b57\uff09\u3001\u300c[abc]\u300d\uff08a\u30fbb\u30fbc\u306e\u3044\u305a\u308c\u304b1\u6587\u5b57\uff09\u304c\u4f7f\u3048\u308b\u3002Excel\u306eCOUNTIF\u95a2\u6570\u306e\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3068\u4f3c\u305f\u30eb\u30fc\u30eb\u3067\u4f7f\u3048\u308b\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Like\u6f14\u7b97\u5b50\u306e\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u4e00\u89a7\u3068\u4f7f\u3044\u65b9\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9<\/th><th>\u610f\u5473<\/th><th>\u4f7f\u7528\u4f8b<\/th><th>\u4e00\u81f4\u3059\u308b\u4f8b<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>*\uff08\u30a2\u30b9\u30bf\u30ea\u30b9\u30af\uff09<\/td><td>0\u6587\u5b57\u4ee5\u4e0a\u306e\u4efb\u610f\u6587\u5b57\u5217<\/td><td>\"*\u5c71\u7530*\"<\/td><td>\u5c71\u7530\u3001\u9234\u6728\u5c71\u7530\u3001\u5c71\u7530\u592a\u90ceA<\/td><\/tr>\n<tr><td>?\uff08\u30af\u30a8\u30b9\u30c1\u30e7\u30f3\uff09<\/td><td>1\u6587\u5b57\u306e\u4efb\u610f\u6587\u5b57<\/td><td>\"\u5c71\u7530?\"<\/td><td>\u5c71\u7530\u592a\u3001\u5c71\u7530\u82b1\uff082\u6587\u5b57\u306e\u307f\uff09<\/td><\/tr>\n<tr><td>[\u6587\u5b57]\uff08\u89d2\u62ec\u5f27\uff09<\/td><td>[]\u5185\u306e\u3044\u305a\u308c\u304b1\u6587\u5b57<\/td><td>\"[AC]\"<\/td><td>A\u307e\u305f\u306fC\uff081\u6587\u5b57\uff09<\/td><\/tr>\n<tr><td>[A-Z]\uff08\u7bc4\u56f2\uff09<\/td><td>\u7bc4\u56f2\u5185\u306e1\u6587\u5b57<\/td><td>\"[A-C]*\"<\/td><td>A\u30fbB\u30fbC\u3067\u59cb\u307e\u308b\u6587\u5b57\u5217<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u62c5\u5f53\u8005\u540d\u306b\u300c\u5c71\u7530\u300d\u304c\u542b\u307e\u308c\u308b\u884c\u3092\u51e6\u7406\nIf Cells(2, 1).Value Like \"*\u5c71\u7530*\" Then\n    Cells(2, 2).Value = \"\u6771\u65e5\u672c\u62c5\u5f53\"\nEnd If\n\n' \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c.co.jp\u3067\u7d42\u308f\u308b\u5834\u5408\nIf Cells(2, 3).Value Like \"*.co.jp\" Then\n    Cells(2, 4).Value = \"\u6cd5\u4eba\"\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5-3. Is\u6f14\u7b97\u5b50\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6bd4\u8f03\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Is\u6f14\u7b97\u5b50\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u306e\u6bd4\u8f03\u5c02\u7528\u3067\u3059\u3002\u6700\u3082\u591a\u304f\u4f7f\u3046\u306e\u306f\u300cIs Nothing\u300d\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u7a7a\u304b\u3069\u3046\u304b\uff09\u3068\u300cIs Not Nothing\u300d\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\uff09\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u691c\u7d22\u7d50\u679c\u304c\u898b\u3064\u304b\u3063\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\nDim foundCell As Range\nSet foundCell = Range(\"A:A\").Find(\"\u5c71\u7530\")\n\nIf foundCell Is Nothing Then\n    MsgBox \"\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\"\nElse\n    MsgBox \"\u767a\u898b: \" & foundCell.Address\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5-4. \u65e5\u4ed8\u306e\u6bd4\u8f03<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u3067\u65e5\u4ed8\u3092\u6bd4\u8f03\u3059\u308b\u5834\u5408\u306f\u3001Date()\u95a2\u6570\uff08\u4eca\u65e5\u306e\u65e5\u4ed8\uff09\u3084CDate()\u95a2\u6570\uff08\u6587\u5b57\u5217\u3092\u65e5\u4ed8\u306b\u5909\u63db\uff09\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3044\u307e\u3059\u3002\u65e5\u4ed8\u3092\u6bd4\u8f03\u6f14\u7b97\u5b50\u3067\u76f4\u63a5\u6bd4\u8f03\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u671f\u9650\u65e5\u304c\u4eca\u65e5\u3088\u308a\u524d\uff08\u671f\u9650\u8d85\u904e\uff09\u306e\u884c\u3092\u51e6\u7406\nDim deadline As Date\ndeadline = CDate(Cells(2, 1).Value)\n\nIf deadline < Date() Then\n    Cells(2, 2).Value = \"\u671f\u9650\u8d85\u904e\"\n    Cells(2, 1).Font.Color = RGB(255, 0, 0)\nEnd If<\/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\">\u65e5\u4ed8\u306e\u6bd4\u8f03\u306f\u30b7\u30ea\u30a2\u30eb\u5024\uff08\u6570\u5024\uff09\u3068\u3057\u3066\u6bd4\u8f03\u3055\u308c\u308b\u305f\u3081\u3001\u901a\u5e38\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u304c\u305d\u306e\u307e\u307e\u4f7f\u3048\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u65e5\u4ed8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u3080\u969b\u306b\u578b\u306e\u4e0d\u4e00\u81f4\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001CDate()\u3067Date\u578b\u306b\u5909\u63db\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3059\u308b\u306e\u304c\u5b89\u5168\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">NESTED IF<\/span>\n  <span class=\"section-title\" style=\"display:block;\">If\u6587\u306e\u30cd\u30b9\u30c8\uff08\u5165\u308c\u5b50\uff09\u3068\u53ef\u8aad\u6027\u3092\u4fdd\u3064\u30b3\u30c4<\/span>\n  <span class=\"section-desc\">\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308a\u3059\u304e\u306a\u3044\u305f\u3081\u306e\u8a2d\u8a08\u30d1\u30bf\u30fc\u30f3\u3068\u30b3\u30fc\u30c9\u306e\u6574\u7406\u65b9\u6cd5<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If\u6587\u306e\u4e2d\u306b\u5225\u306eIf\u6587\u3092\u66f8\u304f\u300c\u30cd\u30b9\u30c8\uff08\u5165\u308c\u5b50\uff09\u300d\u69cb\u9020\u306f\u3001\u8907\u96d1\u306a\u6761\u4ef6\u5206\u5c90\u3092\u8868\u73fe\u3059\u308b\u969b\u306b\u4f7f\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308a\u3059\u304e\u308b\u3068<strong>\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u304c\u5927\u5e45\u306b\u4f4e\u4e0b\u3057\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u306b\u306a\u308b<\/strong>\u305f\u3081\u3001\u6ce8\u610f\u304c\u5fc5\u8981\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>\u30cd\u30b9\u30c8\uff08\u5165\u308c\u5b50\uff09<\/strong>\uff1a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067If\u6587\u3084\u30eb\u30fc\u30d7\uff08For\u6587\u30fbDo While\u6587\uff09\u306e\u4e2d\u306b\u540c\u7a2e\u306e\u69cb\u6587\u3092\u5165\u308c\u308b\u69cb\u9020\u3002VBA\u306eIf\u30cd\u30b9\u30c8\u306f\u300cIf \u6761\u4ef61 Then If \u6761\u4ef62 Then \u51e6\u7406 End If End If\u300d\u306e\u5f62\u3002\u30a4\u30f3\u30c7\u30f3\u30c8\uff08\u5b57\u4e0b\u3052\uff09\u304c\u6df1\u304f\u306a\u308b\u307b\u3069\u53ef\u8aad\u6027\u304c\u4e0b\u304c\u308b\u305f\u3081\u3001\u30cd\u30b9\u30c8\u306f3\u6bb5\u968e\u4ee5\u5185\u3092\u76ee\u5b89\u306b\u3059\u308b\u3002\u6df1\u3044\u30cd\u30b9\u30c8\u306fElseIf\u306e\u6d3b\u7528\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u306e\u7d44\u307f\u5408\u308f\u305b\u30fb\u30b5\u30d6\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u5206\u5272\u3067\u89e3\u6d88\u3067\u304d\u308b\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6-1. \u30cd\u30b9\u30c8\u306e\u57fa\u672c\u4f8b\u3068\u66f8\u304d\u65b9<\/h3>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' \u90e8\u7f72\u304c\u300c\u55b6\u696d\u90e8\u300d\u304b\u3064\u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a\u306e\u5834\u5408\u306e\u51e6\u7406\nIf Cells(2, 1).Value = \"\u55b6\u696d\u90e8\" Then\n    If Cells(2, 2).Value >= 1000000 Then\n        Cells(2, 3).Value = \"\u6700\u512a\u79c0\"\n    Else\n        Cells(2, 3).Value = \"\u512a\u826f\"\n    End If\nElse\n    Cells(2, 3).Value = \"\u5bfe\u8c61\u5916\"\nEnd If<\/pre>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6-2. \u30cd\u30b9\u30c8\u3092\u6d45\u304f\u3059\u308b\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8a18\u306e\u30cd\u30b9\u30c8\u4f8b\u306f\u3001And\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u30661\u3064\u306eIf\u6587\u306b\u66f8\u304d\u76f4\u305b\u307e\u3059\u3002\u30cd\u30b9\u30c8\u304c\u6df1\u3044\u5834\u5408\u306fAnd\/Or\u6f14\u7b97\u5b50\u3067\u7d50\u5408\u3067\u304d\u306a\u3044\u304b\u3001\u65e9\u671f\u30ea\u30bf\u30fc\u30f3\uff08Exit Sub\/Exit Function\uff09\u3067\u5206\u5c90\u3092\u6e1b\u3089\u305b\u306a\u3044\u304b\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' And\u6f14\u7b97\u5b50\u3067\u30cd\u30b9\u30c8\u3092\u89e3\u6d88\u3057\u305f\u4f8b\nIf Cells(2, 1).Value = \"\u55b6\u696d\u90e8\" And Cells(2, 2).Value >= 1000000 Then\n    Cells(2, 3).Value = \"\u6700\u512a\u79c0\"\nElseIf Cells(2, 1).Value = \"\u55b6\u696d\u90e8\" Then\n    Cells(2, 3).Value = \"\u512a\u826f\"\nElse\n    Cells(2, 3).Value = \"\u5bfe\u8c61\u5916\"\nEnd If<\/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;\"><span style=\"font-size:18px;\">&#128161;<\/span><strong style=\"color:#16a34a;font-size:15px;\">\u30cd\u30b9\u30c8\u306f3\u6bb5\u968e\u3092\u4e0a\u9650\u306e\u76ee\u5b89\u306b<\/strong><\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u30cd\u30b9\u30c8\u304c3\u6bb5\u968e\u3092\u8d85\u3048\u308b\u3068\u53ef\u8aad\u6027\u304c\u6025\u6fc0\u306b\u4f4e\u4e0b\u3057\u307e\u3059\u3002\u6df1\u3044\u30cd\u30b9\u30c8\u306b\u306a\u3063\u305f\u5834\u5408\u306f\u3001\u5185\u90e8\u306e\u51e6\u7406\u3092Sub\uff08\u30b5\u30d6\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\uff09\u307e\u305f\u306fFunction\uff08\u95a2\u6570\uff09\u306b\u5206\u5272\u3059\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8907\u6570\u306e\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306b\u5206\u3051\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u30ed\u30b8\u30c3\u30af\u304c\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u3001\u30c6\u30b9\u30c8\u3082\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\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\">\u5b9f\u52d9\u3067\u3088\u304f\u898b\u308b\u306e\u306f\u300c\u30cd\u30b9\u30c8\u304c5\u301c6\u6bb5\u306b\u306a\u3063\u3066\u3044\u3066\u3001\u3069\u306eEnd If\u304c\u3069\u308c\u306b\u5bfe\u5fdc\u3059\u308b\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u30b3\u30fc\u30c9\u3067\u3059\u3002\u3053\u3046\u3044\u3063\u305f\u30b3\u30fc\u30c9\u306fClaude Code\u306b\u300c\u3053\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u3084\u3059\u304f\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3057\u3066\u300d\u3068\u4f9d\u983c\u3059\u308b\u3068\u3001\u30cd\u30b9\u30c8\u3092\u89e3\u6d88\u3057\u305f\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u306b\u66f8\u304d\u76f4\u3057\u3066\u304f\u308c\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" 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;\">IF VS SELECT<\/span>\n  <span class=\"section-title\" style=\"display:block;\">If\u6587 vs Select Case\uff1a\u4f7f\u3044\u5206\u3051\u306e\u5224\u65ad\u57fa\u6e96<\/span>\n  <span class=\"section-desc\">\u540c\u4e00\u5909\u6570\u306e\u5024\u3092\u8907\u6570\u30d1\u30bf\u30fc\u30f3\u3067\u30c1\u30a7\u30c3\u30af\u3059\u308b\u5834\u5408\u306fSelect Case\u304c\u8aad\u307f\u3084\u3059\u3044<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306b\u306f\u6761\u4ef6\u5206\u5c90\u306e\u69cb\u6587\u3068\u3057\u3066<strong>If\u6587\u306e\u4ed6\u306b\u300cSelect Case\u6587\u300d<\/strong>\u3082\u3042\u308a\u307e\u3059\u3002\u540c\u3058\u5909\u6570\u306e\u5024\u3092\u8907\u6570\u306e\u5024\u3068\u6bd4\u8f03\u3059\u308b\u5834\u5408\u306f\u3001Select Case\u3092\u4f7f\u3046\u65b9\u304c\u30b3\u30fc\u30c9\u304c\u3059\u3063\u304d\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u69cb\u6587<\/th><th>\u5411\u3044\u3066\u3044\u308b\u30b1\u30fc\u30b9<\/th><th>\u5411\u3044\u3066\u3044\u306a\u3044\u30b1\u30fc\u30b9<\/th><th>\u8aad\u307f\u3084\u3059\u3055<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>If-ElseIf<\/td><td>\u7570\u306a\u308b\u5909\u6570\u30fb\u8907\u96d1\u306a\u8907\u5408\u6761\u4ef6\u30fb\u7bc4\u56f2\u6bd4\u8f03<\/td><td>\u540c\u4e00\u5909\u6570\u3092\u591a\u6570\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u6bd4\u8f03<\/td><td>\u8907\u5408\u6761\u4ef6\u306b\u5f37\u3044<\/td><\/tr>\n<tr><td>Select Case<\/td><td>\u540c\u4e00\u5909\u6570\u3092\u8907\u6570\u306e\u5024\u3084\u7bc4\u56f2\u3067\u6bd4\u8f03<\/td><td>\u7570\u306a\u308b\u5909\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u6761\u4ef6<\/td><td>\u540c\u4e00\u5909\u6570\u306e\u591a\u5206\u5c90\u306b\u5f37\u3044<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u300c\u90fd\u9053\u5e9c\u770c\u30b3\u30fc\u30c9\u306b\u5fdc\u3058\u3066\u5730\u57df\u3092\u8fd4\u3059\u300d\u51e6\u7406\u306eIf\u6587\u3068Select Case\u306e\u6bd4\u8f03\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' If-ElseIf\u3067\u306e\u66f8\u304d\u65b9\uff08\u3084\u3084\u5197\u9577\uff09\nDim pref As String\npref = Cells(2, 1).Value\n\nIf pref = \"\u5317\u6d77\u9053\" Then\n    Cells(2, 2).Value = \"\u5317\u6d77\u9053\"\nElseIf pref = \"\u9752\u68ee\" Or pref = \"\u5ca9\u624b\" Or pref = \"\u5bae\u57ce\" Then\n    Cells(2, 2).Value = \"\u6771\u5317\"\nElseIf pref = \"\u6771\u4eac\" Or pref = \"\u795e\u5948\u5ddd\" Or pref = \"\u57fc\u7389\" Or pref = \"\u5343\u8449\" Then\n    Cells(2, 2).Value = \"\u95a2\u6771\"\nElse\n    Cells(2, 2).Value = \"\u305d\u306e\u4ed6\"\nEnd If<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <div style=\"font-size:11px;color:#888;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;\">VBA<\/div>\n  <pre style=\"margin:0;font-family:'Courier New',Consolas,monospace;font-size:14px;line-height:1.8;color:#d4d4d4;white-space:pre;\">' Select Case\u3067\u306e\u66f8\u304d\u65b9\uff08\u540c\u4e00\u5909\u6570\u6bd4\u8f03\u306a\u3089\u3053\u3061\u3089\u304c\u8aad\u307f\u3084\u3059\u3044\uff09\nDim pref As String\npref = Cells(2, 1).Value\n\nSelect Case pref\n    Case \"\u5317\u6d77\u9053\"\n        Cells(2, 2).Value = \"\u5317\u6d77\u9053\"\n    Case \"\u9752\u68ee\", \"\u5ca9\u624b\", \"\u5bae\u57ce\"\n        Cells(2, 2).Value = \"\u6771\u5317\"\n    Case \"\u6771\u4eac\", \"\u795e\u5948\u5ddd\", \"\u57fc\u7389\", \"\u5343\u8449\"\n        Cells(2, 2).Value = \"\u95a2\u6771\"\n    Case Else\n        Cells(2, 2).Value = \"\u305d\u306e\u4ed6\"\nEnd Select<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Select Case\u306fCase\u53e5\u3067\u300cIs >= 80\u300d\u306e\u3088\u3046\u306a\u7bc4\u56f2\u6bd4\u8f03\u3082\u3067\u304d\u307e\u3059\u3002\u300cCase Is >= 90\u300d\u300cCase 80 To 89\u300d\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u304c\u53ef\u80fd\u3067\u3001\u6210\u7e3e\u8a55\u4fa1\u306e\u3088\u3046\u306a\u7528\u9014\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u6761\u4ef6\u306e\u7a2e\u985e\u3092\u78ba\u8a8d<\/strong><br><span style=\"font-size:12px;\">\u540c\u4e00\u5909\u6570\u3092\u6bd4\u8f03\uff1f<br>\u8907\u5408\u6761\u4ef6\uff1f<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>\u5224\u65ad<\/strong><br><span style=\"font-size:12px;\">\u540c\u4e00\u5909\u6570\u30923\u30d1\u30bf\u30fc\u30f3\u4ee5\u4e0a\u6bd4\u8f03<br>\u2192 Select Case\u6709\u5229<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>\u3082\u3057\u304f\u306f<\/strong><br><span style=\"font-size:12px;\">\u8907\u6570\u5909\u6570\u30fbAnd\/Or\u5fc5\u8981<br>\u2192 If-ElseIf\u6709\u5229<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>\u5b9f\u88c5<\/strong><br><span style=\"font-size:12px;\">\u3069\u3061\u3089\u3082\u540c\u3058\u52d5\u4f5c<br>\u8aad\u307f\u3084\u3059\u3044\u65b9\u3092\u9078\u3076<\/span><\/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\">Select Case\u306fIf\u6587\u3088\u308a\u9ad8\u901f\u306a\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\u3001Excel VBA\u306e\u30de\u30af\u30ed\u898f\u6a21\u3067\u306f\u4f53\u611f\u5dee\u306f\u307b\u307c\u3042\u308a\u307e\u305b\u3093\u3002\u5b9f\u52d9\u3067\u306f\u300c\u8aad\u3093\u3060\u6642\u306b\u3059\u3050\u610f\u5473\u304c\u5206\u304b\u308b\u304b\u300d\u3092\u512a\u5148\u3057\u3066\u9078\u3076\u306e\u304c\u826f\u3044\u30a2\u30d7\u30ed\u30fc\u30c1\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\/aibpo\/makase\/blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=aibpo_makase\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u793e\u54e1AIKATA\uff08\u670830\u4e07\u5186\u3067\u696d\u52d9\u307e\u304b\u305b\u653e\u984c\uff09\u306e\u7121\u6599\u76f8\u8ac7 \u4e88\u7d04\u30da\u30fc\u30b8\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\/09\/cta_blog_makase_20260904.jpg\" alt=\"AI\u793e\u54e1AIKATA\uff5c\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u5fa1\u793e\u306e\u696d\u52d9\u3092\u307e\u308b\u3054\u3068\u5dfb\u304d\u53d6\u308a\u307e\u3059\uff08\u7121\u6599\u76f8\u8ac760\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/koteihi-line\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-vba-if&#038;blog_slug=cc-vba-if&#038;blog_title=%E3%80%902026%E5%B9%B48%E6%9C%88%E6%9C%80%E6%96%B0%E3%80%91VBA%E3%81%AEIf%E6%96%87%E5%AE%8C%E5%85%A8%E3%82%AC%E3%82%A4%E3%83%89%EF%BD%9CElseIf%E3%83%BB%E8%AB%96%E7%90%86%E6%BC%94%E7%AE%97%E5%AD%90%E3%83%BB%E3%83%8D%E3%82%B9%E3%83%88%E3%83%BBClaude%20Code%E3%81%A7%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%BE%E3%81%A7&#038;blog_url=https%3A%2F%2Fgenai-ai.co.jp%2Fai-kanri%2Fblog%2Fcc-vba-if%2F&#038;utm_campaign=koteihi_shindan\" target=\"_blank\" rel=\"noopener\" aria-label=\"\u516c\u5f0fLINE\u306e\u56fa\u5b9a\u8cbb\u524a\u6e1b\u8a3a\u65ad\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\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\/09\/cta_blog_koteihi_line.jpg\" alt=\"\u5fa1\u793e\u304c\u6e1b\u3089\u305b\u308b\u56fa\u5b9a\u8cbb\u306f\u6708\u3044\u304f\u3089\u304b\uff5c\u516c\u5f0fLINE\u3067\u8cea\u554f\u306b\u7b54\u3048\u308b\u3060\u3051\uff08\u7121\u6599\u30fb\u7d041\u5206\uff09\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-08\"><\/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;\">08<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CLAUDE CODE VBA<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Claude Code\u3067VBA\u306eIf\u6587\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u6761\u4ef6\u306e\u8aac\u660e\u3092\u65e5\u672c\u8a9e\u3067\u5165\u529b\u3059\u308b\u3060\u3051\u3067VBA\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3067\u304d\u308b\u5b9f\u8df5\u7684\u306a\u65b9\u6cd5<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VBA\u306eIf\u6587\u306e\u66f8\u304d\u65b9\u3092\u7406\u89e3\u3057\u3066\u3082\u3001\u300c\u5b9f\u969b\u306b\u3069\u3046\u66f8\u3051\u3070\u3044\u3044\u304b\u8ff7\u3046\u300d\u300c\u8907\u96d1\u306a\u6761\u4ef6\u3092\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3081\u306a\u3044\u300d\u3068\u3044\u3046\u5834\u9762\u306f\u5fc5\u305a\u51fa\u3066\u304d\u307e\u3059\u30022026\u5e74\u73fe\u5728\u3001<strong>Claude Code\u3092\u4f7f\u3048\u3070VBA\u306eIf\u6587\u3092\u542b\u3080\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u6307\u793a\u3057\u3066\u81ea\u52d5\u751f\u6210<\/strong>\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8-1. Claude Code\u3078\u306eVBA\u30b3\u30fc\u30c9\u751f\u6210\u6307\u793a\u306e\u4f8b<\/h3>\n\n\n\n<table>\n<thead><tr><th>\u3042\u306a\u305f\u306e\u6307\u793a<\/th><th>Claude Code\u304c\u751f\u6210\u3059\u308b\u3082\u306e<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u300cB\u5217\u306e\u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a\u304b\u3064C\u5217\u306e\u9054\u6210\u7387\u304c90%\u4ee5\u4e0a\u306a\u3089\"\u30c0\u30d6\u30eb\u9054\u6210\"\u3001100\u4e07\u4ee5\u4e0a\u306a\u3089\"\u5358\u72ec\u9054\u6210\"\u3001\u305d\u308c\u4ee5\u5916\u306f\"\u672a\u9054\"\u3068\u5165\u529b\u3059\u308bVBA\u30de\u30af\u30ed\u300d<\/td><td>ElseIf + And\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u305f\u9069\u5207\u306aVBA\u30b3\u30fc\u30c9<\/td><\/tr>\n<tr><td>\u300cA\u5217\u306e\u62c5\u5f53\u8005\u540d\u306b\"\u5c71\u7530\"\u307e\u305f\u306f\"\u9234\u6728\"\u304c\u542b\u307e\u308c\u308b\u884c\u3092\u5225\u30b7\u30fc\u30c8\u306b\u30b3\u30d4\u30fc\u3059\u308b\u30de\u30af\u30ed\u300d<\/td><td>Like\u6f14\u7b97\u5b50 + Or\u6f14\u7b97\u5b50 + \u884c\u30b3\u30d4\u30fc\u51e6\u7406\u306eVBA\u30b3\u30fc\u30c9<\/td><\/tr>\n<tr><td>\u300c\u3053\u306e\u30b3\u30fc\u30c9\u306e\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u3066\u8aad\u307f\u306b\u304f\u3044\u306e\u3067\u8aad\u307f\u3084\u3059\u304f\u66f8\u304d\u76f4\u3057\u3066\uff08\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\uff09\u300d<\/td><td>And\/Or\u6f14\u7b97\u5b50\u3067\u30cd\u30b9\u30c8\u3092\u89e3\u6d88\u3057\u305f\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9<\/td><\/tr>\n<tr><td>\u300c\u65e5\u4ed8\u5217\u304c\u4eca\u65e5\u3088\u308a30\u65e5\u4ee5\u5185\u306b\u671f\u9650\u304c\u6765\u308b\u884c\u306b\u9ec4\u8272\u3092\u4ed8\u3051\u308bVBA\u30de\u30af\u30ed\u300d<\/td><td>\u65e5\u4ed8\u6bd4\u8f03 + Interior.Color \u306eVBA\u30b3\u30fc\u30c9<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<h3 class=\"wp-block-heading\">8-2. \u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u304cClaude Code\u3092\u4f7f\u3046\u5b9f\u969b\u306e\u6d41\u308c<\/h3>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u3084\u308a\u305f\u3044\u3053\u3068\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e<\/strong><br><span style=\"font-size:12px;\">\u300c\u3007\u3007\u306e\u5834\u5408\u306b\u25b3\u25b3\u3059\u308b<br>Excel\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u300d<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>VBA\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u308b<\/strong><br><span style=\"font-size:12px;\">If\u6587\u30fbElseIf\u30fb<br>\u6f14\u7b97\u5b50\u3092\u81ea\u52d5\u9078\u629e<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>Excel\u306bVBA\u3092\u8cbc\u308a\u4ed8\u3051<\/strong><br><span style=\"font-size:12px;\">Alt+F11 \u2192 \u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb<br>\u2192 \u8cbc\u308a\u4ed8\u3051\u3066\u5b9f\u884c<\/span><\/div>  <div class=\"g-flow-arrow\">&#8594;<\/div>  <div class=\"g-flow-item\"><strong>\u52d5\u4f5c\u78ba\u8a8d\u30fb\u4fee\u6b63\u4f9d\u983c<\/strong><br><span style=\"font-size:12px;\">\u300c\u3007\u3007\u306e\u5834\u5408\u3082\u8ffd\u52a0\u3057\u3066\u300d<br>\u3068\u4f1d\u3048\u3066\u8ffd\u52a0\u4fee\u6b63<\/span><\/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\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3082\u3089\u3046<\/strong>\uff1a\u6761\u4ef6\u3068\u51e6\u7406\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\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>\u65e2\u5b58\u30b3\u30fc\u30c9\u306e\u4fee\u6b63<\/strong>\uff1a\u300c\u3053\u306e\u30b3\u30fc\u30c9\u306b\u3007\u3007\u306e\u6761\u4ef6\u3092\u8ffd\u52a0\u3057\u3066\u300d\u3068\u65e2\u5b58\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u4f9d\u983c<\/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>\u30a8\u30e9\u30fc\u306e\u89e3\u6c7a<\/strong>\uff1a\u300c\u3053\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u539f\u56e0\u3068\u4fee\u6b63\u65b9\u6cd5\u3092\u6559\u3048\u3066\u300d\u3068\u5165\u529b<\/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>\u30b3\u30fc\u30c9\u306e\u89e3\u8aac<\/strong>\uff1a\u300c\u3053\u306eVBA\u30b3\u30fc\u30c9\u304c\u4f55\u3092\u3057\u3066\u3044\u308b\u304b\u8aac\u660e\u3057\u3066\u300d\u3068\u65e2\u5b58\u30b3\u30fc\u30c9\u306e\u7406\u89e3\u306b\u6d3b\u7528<\/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>\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0<\/strong>\uff1a\u300c\u3053\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3063\u3068\u8aad\u307f\u3084\u3059\u304f\u66f8\u304d\u76f4\u3057\u3066\u300d\u3067\u53ef\u8aad\u6027\u3092\u5411\u4e0a<\/span><\/div>\n\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\u3067VBA\u4f5c\u696d\u304c\u5287\u7684\u306b\u52b9\u7387\u5316<\/div>\n    <div style=\"font-size:14px;color:rgba(255,255,255,0.7);margin-top:4px;\">If\u6587\u306e\u66f8\u304d\u65b9\u3067\u8ff7\u3046\u6642\u9593\u30fb\u30a8\u30e9\u30fc\u3067\u60a9\u3080\u6642\u9593\u30fb\u30b3\u30fc\u30c9\u306e\u30c7\u30d0\u30c3\u30b0\u6642\u9593\u304c\u5927\u5e45\u524a\u6e1b\u3002VBA\u30b3\u30fc\u30c9\u30921\u304b\u3089\u899a\u3048\u306a\u304f\u3066\u3082\u3001\u3084\u308a\u305f\u3044\u3053\u3068\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u3060\u3051\u3067\u30de\u30af\u30ed\u304c\u5b8c\u6210\u3059\u308b\u6642\u4ee3\u306b\u306a\u3063\u305f\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\u793e\u306e\u652f\u63f4\u5148\u3067\u300cExcel\u306eVBA\u304c\u5168\u304f\u66f8\u3051\u306a\u3044\u304c\u3001\u65e5\u5831\u306e\u81ea\u52d5\u96c6\u8a08\u30de\u30af\u30ed\u3092\u4f5c\u308a\u305f\u3044\u300d\u3068\u3044\u3046\u304a\u5ba2\u69d8\u304c\u3044\u307e\u3057\u305f\u3002Claude Code\u306b\u300cA1:A10\u306e\u5408\u8a08\u3092\u8a08\u7b97\u3057\u3001100\u4e07\u4ee5\u4e0a\u306a\u3089\u9054\u6210\u3068B1\u306b\u5165\u529b\u3059\u308b\u30de\u30af\u30ed\u300d\u3068\u4f1d\u3048\u308b\u3060\u3051\u3067\u5b8c\u6210\u3057\u305f\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3001\u300c\u3053\u308c\u306a\u3089\u81ea\u5206\u3067\u3082\u3067\u304d\u308b\u300d\u3068\u304a\u3063\u3057\u3083\u3063\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">VBA\u306e\u6761\u4ef6\u5206\u5c90\u3082\u3001Claude Code\u3067\u81ea\u52d5\u751f\u6210\u3067\u304d\u307e\u3059<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cIf\u6587\u306eElseIf\u304c\u4f55\u6bb5\u3082\u3042\u3063\u3066\u8aad\u307f\u306b\u304f\u3044\u300d\u300c\u8907\u96d1\u306a\u6761\u4ef6\u3092VBA\u3067\u5b9f\u73fe\u3057\u305f\u3044\u300d\u2014\u2014\u3053\u3046\u3057\u305fExcel VBA\u306e\u8ab2\u984c\u306fClaude Code\u3067\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002\u6761\u4ef6\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u308b\u305f\u3081\u3001VBA\u30921\u304b\u3089\u899a\u3048\u306a\u304f\u3066\u3082\u696d\u52d9\u81ea\u52d5\u5316\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u7121\u6599\u76f8\u8ac7\u3067\u3001Excel\u3067\u306e\u81ea\u52d5\u5316\u306e\u8ab2\u984c\u3092\u30d2\u30a2\u30ea\u30f3\u30b0\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002Claude Code\u3092\u6d3b\u7528\u3057\u305f\u696d\u52d9\u52b9\u7387\u5316\u306e\u5177\u4f53\u7684\u306a\u65b9\u6cd5\u3092\u3054\u63d0\u6848\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fff;border:2px solid #eee;border-radius:16px;padding:32px 20px;margin:48px 0 16px;\">\n  <p style=\"text-align:center;font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"text-align:center;font-size:22px;font-weight:800;line-height:1.5;color:#1a1a1a;margin:0 0 24px;\">\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=\"display:flex;gap:16px;flex-wrap:wrap;justify-content:center;\">\n    <div style=\"flex:1 1 300px;max-width:560px;background:#fafafa;border:1px solid #eee;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;\">\n      <img src=\"https:\/\/genai-ai.co.jp\/img\/flagship-onikanri.png\" alt=\"AI\u9b3c\u7ba1\u7406 \u2014 Claude Code\u5c0e\u5165\u652f\u63f4\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\" loading=\"lazy\" decoding=\"async\" style=\"width:100%;height:auto;aspect-ratio:16\/9;object-fit:cover;display:block;\">\n      <div style=\"padding:20px 20px 24px;display:flex;flex-direction:column;flex:1;\">\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;color:#1a1a1a;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n        <p style=\"font-size:14px;color:#555;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;margin-top:auto;\">\n          <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&utm_medium=article&utm_campaign=cc-vba-if&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    <div style=\"flex:1 1 300px;max-width:560px;background:#fafafa;border:1px solid #eee;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;\">\n      <img src=\"https:\/\/genai-ai.co.jp\/img\/flagship-aibpo.png\" alt=\"AI\u793e\u54e1AIKATA \u2014 \u5b9a\u578b\u696d\u52d9\u306e\u4e38\u3054\u3068\u4ee3\u884c\" loading=\"lazy\" decoding=\"async\" style=\"width:100%;height:auto;aspect-ratio:16\/9;object-fit:cover;display:block;\">\n      <div style=\"padding:20px 20px 24px;display:flex;flex-direction:column;flex:1;\">\n        <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">\u696d\u52d9\u3092\u4e38\u3054\u3068\u4efb\u305b\u305f\u3044\u65b9\u3078<\/p>\n        <p style=\"font-size:20px;font-weight:800;color:#1a1a1a;margin:0 0 12px;\">AI\u793e\u54e1AIKATA<\/p>\n        <p style=\"font-size:14px;color:#555;margin:0 0 20px;line-height:1.7;\">\u8acb\u6c42\u51e6\u7406\u30fb\u30c7\u30fc\u30bf\u5165\u529b\u30fb\u554f\u3044\u5408\u308f\u305b\u5bfe\u5fdc\u306a\u3069\u306e\u5b9a\u578b\u696d\u52d9\u3092\u3001AI\u00d7\u4eba\u306e\u54c1\u8cea\u7ba1\u7406\u4f53\u5236\u3067\u4e38\u3054\u3068\u4ee3\u884c\u3002\u670830\u4e07\u5186\u306e\u5b9a\u984d\u3067\u307e\u304b\u305b\u653e\u984c\u3001\u65e5\u3005\u306f\u6210\u679c\u7269\u3092\u627f\u8a8d\u3059\u308b\u3060\u3051\u3002<\/p>\n        <div style=\"text-align:center;margin-top:auto;\">\n          <a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/ai-bpo\/?utm_source=blog&utm_medium=article&utm_campaign=cc-vba-if&utm_content=next-step-cta-bpo\" 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\u793e\u54e1AIKATA\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n        <\/div>\n      <\/div>\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\u306eIf\u6587\u306e\u57fa\u672c\u7684\u306a\u66f8\u304d\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. VBA\u306eIf\u6587\u306e\u57fa\u672c\u69cb\u6587\u306f\u300cIf \u6761\u4ef6 Then \u51e6\u7406 End If\u300d\u3067\u3059\u3002\u51e6\u7406\u304c1\u884c\u306a\u3089\u300cIf \u6761\u4ef6 Then \u51e6\u7406\u300d\u30681\u884c\u3067\u66f8\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059\uff08\u3053\u306e\u5834\u5408End If\u306f\u4e0d\u8981\uff09\u3002\u6761\u4ef6\u304cFalse\u306e\u5834\u5408\u306e\u51e6\u7406\u3082\u66f8\u304f\u5834\u5408\u306f\u300cIf \u6761\u4ef6 Then \u51e6\u7406A Else \u51e6\u7406B End If\u300d\u306e\u5f62\u3067\u3059\u30023\u3064\u4ee5\u4e0a\u306e\u5206\u5c90\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fElseIf\u3092\u4f7f\u3044\u300cIf \u6761\u4ef61 Then \u51e6\u74061 ElseIf \u6761\u4ef62 Then \u51e6\u74062 Else \u51e6\u74063 End If\u300d\u3068\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067ElseIf\u3092\u4f7f\u3046\u969b\u306e\u6ce8\u610f\u70b9\u306f\u4f55\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. ElseIf\u306f\u6761\u4ef6\u3092\u4e0a\u304b\u3089\u9806\u306b\u8a55\u4fa1\u3057\u3001\u6700\u521d\u306bTrue\u306b\u306a\u3063\u305f\u6761\u4ef6\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u6b8b\u308a\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u6761\u4ef6\u306e\u9806\u756a\u304c\u91cd\u8981\u3067\u3059\u3002\u4f8b\u3048\u3070\u30b9\u30b3\u30a2\u306e\u8a55\u4fa1\u3067\u300c90\u70b9\u4ee5\u4e0a\u2192S\u300d\u300c80\u70b9\u4ee5\u4e0a\u2192A\u300d\u3068\u3059\u308b\u5834\u5408\u3001\u5fc5\u305a90\u70b9\u306e\u6761\u4ef6\u3092\u5148\u306b\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u9006\u306b80\u70b9\u306e\u6761\u4ef6\u3092\u5148\u306b\u66f8\u304f\u3068\u300190\u70b9\u306e\u4eba\u3082\u300cA\u300d\u3068\u5224\u5b9a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u307e\u305f\u3001ElseIf\u306f\u300cElseIf\u300d\u30681\u3064\u306e\u5358\u8a9e\u3067\u66f8\u304d\u307e\u3059\uff08Else If\u3068\u5206\u3051\u308b\u3068\u30d6\u30ed\u30c3\u30af\u304c\u9589\u3058\u306a\u3044\u30d0\u30b0\u306b\u306a\u308a\u307e\u3059\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u306eAnd\u6f14\u7b97\u5b50\u3068Or\u6f14\u7b97\u5b50\u306e\u9055\u3044\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. And\u6f14\u7b97\u5b50\u306f\u300c\u4e21\u65b9\u306e\u6761\u4ef6\u304cTrue\u306e\u5834\u5408\u306e\u307fTrue\u3092\u8fd4\u3059\u300d\u6f14\u7b97\u5b50\u3067\u3059\u3002Or\u6f14\u7b97\u5b50\u306f\u300c\u5c11\u306a\u304f\u3068\u3082\u4e00\u65b9\u304cTrue\u306e\u5834\u5408\u306bTrue\u3092\u8fd4\u3059\u300d\u6f14\u7b97\u5b50\u3067\u3059\u3002\u4f8b\u3048\u3070\u300cA >= 80 And B >= 80\u300d\u306f\u4e21\u65b980\u4ee5\u4e0a\u306e\u5834\u5408\u306e\u307fTrue\u3001\u300cA >= 80 Or B >= 80\u300d\u306f\u3069\u3061\u3089\u304b\u304c80\u4ee5\u4e0a\u306a\u3089True\u306b\u306a\u308a\u307e\u3059\u3002\u8907\u6570\u306e\u6f14\u7b97\u5b50\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306f\u3001\u30ab\u30c3\u30b3()\u3067\u512a\u5148\u9806\u4f4d\u3092\u660e\u793a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u306eLike\u6f14\u7b97\u5b50\u306e\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Like\u6f14\u7b97\u5b50\u306f\u6587\u5b57\u5217\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u306b\u4f7f\u3044\u307e\u3059\u3002\u300c\u5909\u6570 Like \u30d1\u30bf\u30fc\u30f3\u300d\u306e\u5f62\u3067\u66f8\u304d\u3001\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3059\u308b\u5834\u5408\u306bTrue\u3092\u8fd4\u3057\u307e\u3059\u3002\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3068\u3057\u3066\u300c*\u300d\uff080\u6587\u5b57\u4ee5\u4e0a\u306e\u4efb\u610f\u6587\u5b57\u5217\uff09\u3001\u300c?\u300d\uff08\u4efb\u610f\u306e1\u6587\u5b57\uff09\u3001\u300c[\u6587\u5b57]\u300d\uff08\u62ec\u5f27\u5185\u306e\u3044\u305a\u308c\u304b1\u6587\u5b57\uff09\u304c\u4f7f\u3048\u307e\u3059\u3002\u4f8b\u3048\u3070\u300cCells(2,1).Value Like \"*\u5c71\u7530*\"\u300d\u306f\u300c\u5c71\u7530\u300d\u3092\u542b\u3080\u6587\u5b57\u5217\u5168\u3066\u306b\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u524d\u5f8c\u691c\u7d22\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af\u306a\u3069\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. If\u6587\u306e\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308a\u3059\u304e\u305f\u5834\u5408\u3001\u3069\u3046\u89e3\u6d88\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u30cd\u30b9\u30c8\u304c\u6df1\u3044\u5834\u5408\u306e\u89e3\u6d88\u7b56\u306f3\u3064\u3067\u3059\u3002\u2460And\/Or\u6f14\u7b97\u5b50\u3067\u8907\u6570\u306e\u6761\u4ef6\u30921\u3064\u306eIf\u6587\u306b\u307e\u3068\u3081\u308b\u3001\u2461ElseIf\u3067\u6bb5\u968e\u7684\u306a\u5206\u5c90\u306b\u66f8\u304d\u76f4\u3059\u3001\u2462\u5185\u90e8\u306e\u51e6\u7406\u3092Sub\uff08\u30b5\u30d6\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\uff09\u3084Function\uff08\u95a2\u6570\uff09\u306b\u5206\u5272\u3057\u3066\u3001\u547c\u3073\u51fa\u3059\u5f62\u306b\u5909\u3048\u308b\u3002\u3069\u308c\u304c\u9069\u5207\u304b\u306f\u30ed\u30b8\u30c3\u30af\u306e\u5185\u5bb9\u306b\u3088\u308a\u307e\u3059\u304c\u3001Claude Code\u306b\u300c\u3053\u306e\u30b3\u30fc\u30c9\u3092\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3057\u3066\u300d\u3068\u4f9d\u983c\u3059\u308b\u3068\u6700\u9069\u306a\u66f8\u304d\u76f4\u3057\u65b9\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u306eIf\u6587\u3068Select Case\u306f\u3069\u3046\u4f7f\u3044\u5206\u3051\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u540c\u4e00\u306e\u5909\u6570\u3092\u8907\u6570\u306e\u5024\u30fb\u30d1\u30bf\u30fc\u30f3\u3068\u6bd4\u8f03\u3059\u308b\u5834\u5408\u306fSelect Case\u3092\u4f7f\u3046\u3068\u30b3\u30fc\u30c9\u304c\u3059\u3063\u304d\u308a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u90fd\u9053\u5e9c\u770c\u30fb\u5546\u54c1\u30b3\u30fc\u30c9\u30fb\u30b9\u30c6\u30fc\u30bf\u30b9\u540d\u306a\u3069\u3001\u7279\u5b9a\u306e\u5024\u3068\u6bd4\u8f03\u3059\u308b\u591a\u5206\u5c90\u306fSelect Case\u304c\u5411\u3044\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3067\u3001\u7570\u306a\u308b\u5909\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u6761\u4ef6\uff08And\/Or\u6f14\u7b97\u5b50\u304c\u5fc5\u8981\u306a\u6761\u4ef6\uff09\u3084\u3001\u300c\u4ee5\u4e0a\u30fb\u4ee5\u4e0b\u300d\u306e\u7bc4\u56f2\u6bd4\u8f03\u3092\u8907\u6570\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306fIf-ElseIf\u306e\u65b9\u304c\u67d4\u8edf\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Claude Code\u3067VBA\u306eIf\u6587\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u3067\u304d\u307e\u3059\u3002Claude Code\u306b\u300c\u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a\u304b\u3064\u9054\u6210\u7387\u304c90%\u4ee5\u4e0a\u306a\u3089\"\u30c0\u30d6\u30eb\u9054\u6210\"\u3068\u5165\u529b\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u300d\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u3067\u6761\u4ef6\u3068\u51e6\u7406\u3092\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u3001\u9069\u5207\u306aIf\u6587\u30fbElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u305fVBA\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u65e2\u5b58\u306eVBA\u30b3\u30fc\u30c9\u306e\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3084\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u89e3\u660e\u306b\u3082\u6d3b\u7528\u3067\u304d\u307e\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\u306eIf\u6587\u306e\u57fa\u672c\u7684\u306a\u66f8\u304d\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"VBA\u306eIf\u6587\u306e\u57fa\u672c\u69cb\u6587\u306f\u300cIf \u6761\u4ef6 Then \u51e6\u7406 End If\u300d\u3067\u3059\u3002\u51e6\u7406\u304c1\u884c\u306a\u3089\u300cIf \u6761\u4ef6 Then \u51e6\u7406\u300d\u30681\u884c\u3067\u66f8\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059\uff08\u3053\u306e\u5834\u5408End If\u306f\u4e0d\u8981\uff09\u3002\u6761\u4ef6\u304cFalse\u306e\u5834\u5408\u306e\u51e6\u7406\u3082\u66f8\u304f\u5834\u5408\u306f\u300cIf \u6761\u4ef6 Then \u51e6\u7406A Else \u51e6\u7406B End If\u300d\u306e\u5f62\u3067\u3059\u30023\u3064\u4ee5\u4e0a\u306e\u5206\u5c90\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fElseIf\u3092\u4f7f\u3044\u300cIf \u6761\u4ef61 Then \u51e6\u74061 ElseIf \u6761\u4ef62 Then \u51e6\u74062 Else \u51e6\u74063 End If\u300d\u3068\u66f8\u304d\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067ElseIf\u3092\u4f7f\u3046\u969b\u306e\u6ce8\u610f\u70b9\u306f\u4f55\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"ElseIf\u306f\u6761\u4ef6\u3092\u4e0a\u304b\u3089\u9806\u306b\u8a55\u4fa1\u3057\u3001\u6700\u521d\u306bTrue\u306b\u306a\u3063\u305f\u6761\u4ef6\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u6b8b\u308a\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u6761\u4ef6\u306e\u9806\u756a\u304c\u91cd\u8981\u3067\u3059\u3002\u4f8b\u3048\u3070\u30b9\u30b3\u30a2\u306e\u8a55\u4fa1\u3067\u300c90\u70b9\u4ee5\u4e0a\u2192S\u300d\u300c80\u70b9\u4ee5\u4e0a\u2192A\u300d\u3068\u3059\u308b\u5834\u5408\u3001\u5fc5\u305a90\u70b9\u306e\u6761\u4ef6\u3092\u5148\u306b\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u9006\u306b80\u70b9\u306e\u6761\u4ef6\u3092\u5148\u306b\u66f8\u304f\u3068\u300190\u70b9\u306e\u4eba\u3082\u300cA\u300d\u3068\u5224\u5b9a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u307e\u305f\u3001ElseIf\u306f\u300cElseIf\u300d\u30681\u3064\u306e\u5358\u8a9e\u3067\u66f8\u304d\u307e\u3059\uff08Else If\u3068\u5206\u3051\u308b\u3068\u30d6\u30ed\u30c3\u30af\u304c\u9589\u3058\u306a\u3044\u30d0\u30b0\u306b\u306a\u308a\u307e\u3059\uff09\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u306eAnd\u6f14\u7b97\u5b50\u3068Or\u6f14\u7b97\u5b50\u306e\u9055\u3044\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"And\u6f14\u7b97\u5b50\u306f\u300c\u4e21\u65b9\u306e\u6761\u4ef6\u304cTrue\u306e\u5834\u5408\u306e\u307fTrue\u3092\u8fd4\u3059\u300d\u6f14\u7b97\u5b50\u3067\u3059\u3002Or\u6f14\u7b97\u5b50\u306f\u300c\u5c11\u306a\u304f\u3068\u3082\u4e00\u65b9\u304cTrue\u306e\u5834\u5408\u306bTrue\u3092\u8fd4\u3059\u300d\u6f14\u7b97\u5b50\u3067\u3059\u3002\u4f8b\u3048\u3070\u300cA >= 80 And B >= 80\u300d\u306f\u4e21\u65b980\u4ee5\u4e0a\u306e\u5834\u5408\u306e\u307fTrue\u3001\u300cA >= 80 Or B >= 80\u300d\u306f\u3069\u3061\u3089\u304b\u304c80\u4ee5\u4e0a\u306a\u3089True\u306b\u306a\u308a\u307e\u3059\u3002\u8907\u6570\u306e\u6f14\u7b97\u5b50\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306f\u3001\u30ab\u30c3\u30b3()\u3067\u512a\u5148\u9806\u4f4d\u3092\u660e\u793a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u306eLike\u6f14\u7b97\u5b50\u306e\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Like\u6f14\u7b97\u5b50\u306f\u6587\u5b57\u5217\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u306b\u4f7f\u3044\u307e\u3059\u3002\u300c\u5909\u6570 Like \u30d1\u30bf\u30fc\u30f3\u300d\u306e\u5f62\u3067\u66f8\u304d\u3001\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3059\u308b\u5834\u5408\u306bTrue\u3092\u8fd4\u3057\u307e\u3059\u3002\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3068\u3057\u3066\u300c*\u300d\uff080\u6587\u5b57\u4ee5\u4e0a\u306e\u4efb\u610f\u6587\u5b57\u5217\uff09\u3001\u300c?\u300d\uff08\u4efb\u610f\u306e1\u6587\u5b57\uff09\u3001\u300c[\u6587\u5b57]\u300d\uff08\u62ec\u5f27\u5185\u306e\u3044\u305a\u308c\u304b1\u6587\u5b57\uff09\u304c\u4f7f\u3048\u307e\u3059\u3002\u4f8b\u3048\u3070\u300cCells(2,1).Value Like \\\"*\u5c71\u7530*\\\"\u300d\u306f\u300c\u5c71\u7530\u300d\u3092\u542b\u3080\u6587\u5b57\u5217\u5168\u3066\u306b\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u524d\u5f8c\u691c\u7d22\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af\u306a\u3069\u306b\u4f7f\u3048\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"If\u6587\u306e\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308a\u3059\u304e\u305f\u5834\u5408\u3001\u3069\u3046\u89e3\u6d88\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u30cd\u30b9\u30c8\u304c\u6df1\u3044\u5834\u5408\u306e\u89e3\u6d88\u7b56\u306f3\u3064\u3067\u3059\u3002\u2460And\/Or\u6f14\u7b97\u5b50\u3067\u8907\u6570\u306e\u6761\u4ef6\u30921\u3064\u306eIf\u6587\u306b\u307e\u3068\u3081\u308b\u3001\u2461ElseIf\u3067\u6bb5\u968e\u7684\u306a\u5206\u5c90\u306b\u66f8\u304d\u76f4\u3059\u3001\u2462\u5185\u90e8\u306e\u51e6\u7406\u3092Sub\uff08\u30b5\u30d6\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\uff09\u3084Function\uff08\u95a2\u6570\uff09\u306b\u5206\u5272\u3057\u3066\u3001\u547c\u3073\u51fa\u3059\u5f62\u306b\u5909\u3048\u308b\u3002\u3069\u308c\u304c\u9069\u5207\u304b\u306f\u30ed\u30b8\u30c3\u30af\u306e\u5185\u5bb9\u306b\u3088\u308a\u307e\u3059\u304c\u3001Claude Code\u306b\u300c\u3053\u306e\u30b3\u30fc\u30c9\u3092\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3057\u3066\u300d\u3068\u4f9d\u983c\u3059\u308b\u3068\u6700\u9069\u306a\u66f8\u304d\u76f4\u3057\u65b9\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u306eIf\u6587\u3068Select Case\u306f\u3069\u3046\u4f7f\u3044\u5206\u3051\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u540c\u4e00\u306e\u5909\u6570\u3092\u8907\u6570\u306e\u5024\u30fb\u30d1\u30bf\u30fc\u30f3\u3068\u6bd4\u8f03\u3059\u308b\u5834\u5408\u306fSelect Case\u3092\u4f7f\u3046\u3068\u30b3\u30fc\u30c9\u304c\u3059\u3063\u304d\u308a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u90fd\u9053\u5e9c\u770c\u30fb\u5546\u54c1\u30b3\u30fc\u30c9\u30fb\u30b9\u30c6\u30fc\u30bf\u30b9\u540d\u306a\u3069\u3001\u7279\u5b9a\u306e\u5024\u3068\u6bd4\u8f03\u3059\u308b\u591a\u5206\u5c90\u306fSelect Case\u304c\u5411\u3044\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3067\u3001\u7570\u306a\u308b\u5909\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u6761\u4ef6\uff08And\/Or\u6f14\u7b97\u5b50\u304c\u5fc5\u8981\u306a\u6761\u4ef6\uff09\u3084\u3001\u300c\u4ee5\u4e0a\u30fb\u4ee5\u4e0b\u300d\u306e\u7bc4\u56f2\u6bd4\u8f03\u3092\u8907\u6570\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306fIf-ElseIf\u306e\u65b9\u304c\u67d4\u8edf\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Claude Code\u3067VBA\u306eIf\u6587\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u3067\u304d\u307e\u3059\u3002Claude Code\u306b\u300c\u58f2\u4e0a\u304c100\u4e07\u4ee5\u4e0a\u304b\u3064\u9054\u6210\u7387\u304c90%\u4ee5\u4e0a\u306a\u3089\\\"\u30c0\u30d6\u30eb\u9054\u6210\\\"\u3068\u5165\u529b\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u300d\u306e\u3088\u3046\u306b\u65e5\u672c\u8a9e\u3067\u6761\u4ef6\u3068\u51e6\u7406\u3092\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u3001\u9069\u5207\u306aIf\u6587\u30fbElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u305fVBA\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u65e2\u5b58\u306eVBA\u30b3\u30fc\u30c9\u306e\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3084\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u89e3\u660e\u306b\u3082\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n\n<!-- RELATED_ARTICLES_START --><div class=\"related-articles related-v2\"><h3>\u95a2\u9023\u8a18\u4e8b \u2014 \u5165\u9580\u30fb\u5c0e\u5165\u30ab\u30c6\u30b4\u30ea\u304b\u3089<\/h3><div class=\"rel-grid\"><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/hub-claude-nyumon\/\" class=\"rel-card rel-pillar\"><span class=\"rel-cat\">\u67f1\u8a18\u4e8b<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011Claude\u5165\u9580\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u59cb\u3081\u65b9\u30fb\u521d\u671f\u8a2d\u5b9a\u30fb\u6700\u521d\u306e\u696d\u52d9\u6d3b\u7528\u307e\u3067<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-claude-code-guide\/\" class=\"rel-card rel-pillar\"><span class=\"rel-cat\">\u67f1\u8a18\u4e8b<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011Claude Code\u3068\u306f\uff1f\u3067\u304d\u308b\u3053\u3068\u30fb\u4f7f\u3044\u65b9\u30fb\u6599\u91d1\u3092\u5b9f\u904b\u7528\u30c7\u30fc\u30bf\u3067\u5fb9\u5e95\u89e3\u8aac<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-js-if-else\/\" class=\"rel-card rel-sibling\"><span class=\"rel-cat\">\u540c\u30c6\u30fc\u30de<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011JavaScript\u306eif\u6587\u3068\u306f\uff1f\u6761\u4ef6\u5206\u5c90\u306e\u8003\u3048\u65b9\u30fbelse if\u306e\u4f7f\u3044\u65b9\u304b\u3089Claude Code\u3067\u306e\u696d\u52d9\u30eb\u30fc\u30eb\u5b9f\u88c5\u307e\u3067<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-macro\/\" class=\"rel-card rel-sibling\"><span class=\"rel-cat\">\u540c\u30c6\u30fc\u30de<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011VBA\u30de\u30af\u30ed\u5165\u9580\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30de\u30af\u30ed\u306e\u4f7f\u3044\u65b9\u304b\u3089Claude Code\u3067\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5\u307e\u3067<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-dim-variable\/\" class=\"rel-card rel-sibling\"><span class=\"rel-cat\">\u540c\u30c6\u30fc\u30de<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011VBA\u306eDim\u5909\u6570\u5ba3\u8a00\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30c7\u30fc\u30bf\u578b\u30fb\u30b9\u30b3\u30fc\u30d7\u30fbOption Explicit\u30fbClaude Code\u6d3b\u7528\u6cd5<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-val-function\/\" class=\"rel-card rel-sibling\"><span class=\"rel-cat\">\u540c\u30c6\u30fc\u30de<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011VBA\u306eVal\u95a2\u6570\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u6587\u5b57\u5217\u2192\u6570\u5024\u5909\u63db\u30fb\u578b\u5909\u63db\u95a2\u6570\u5168\u7a2e\u985e\u30fbClaude Code\u6d3b\u7528\u6cd5<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-yt-claude-install-beginner-22\/\" class=\"rel-card rel-cross_sub\"><span class=\"rel-cat\">\u95a2\u9023\u5206\u91ce<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011Claude Code\u306e\u59cb\u3081\u65b9\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3089\u521d\u671f\u8a2d\u5b9a\u30fb3\u3064\u306e\u4f7f\u3044\u65b9\u307e\u3067\u5fb9\u5e95\u89e3\u8aac<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vs-genspark-09\/\" class=\"rel-card rel-winner\"><span class=\"rel-cat\">\u4eba\u6c17\u8a18\u4e8b<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011Claude Code vs Genspark \u5fb9\u5e95\u6bd4\u8f03\uff5c6\u3064\u306e\u8ef8\u3067\u6b63\u76f4\u306b\u52dd\u6557\u3092\u3064\u3051\u305f\u7d50\u679c<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/hub-claude-kino\/\" class=\"rel-card rel-bridge\"><span class=\"rel-cat\">\u6df1\u5800\u308a<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011Claude Code\uff0fCodex\u6a5f\u80fd\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u7d4c\u55b6\u8005\u306e\u305f\u3081\u306e\u6a5f\u80fd\u89e3\u8aac\u30fb\u6d3b\u7528\u5224\u65ad<\/span><\/a><a href=\"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-c-if-statement\/\" class=\"rel-card rel-related\"><span class=\"rel-cat\">\u95a2\u9023<\/span><span class=\"rel-title\">\u30102026\u5e748\u6708\u6700\u65b0\u3011C\u8a00\u8a9e\u306eif\u6587\u5b8c\u5168\u30ac\u30a4\u30c9\uff5celse\u30fbAND\/OR\u30fb\u30cd\u30b9\u30c8\u30fbswitch\u6bd4\u8f03\u30fbClaude Code\u6d3b\u7528\u6cd5<\/span><\/a><\/div><\/div><!-- RELATED_ARTICLES_END -->","protected":false},"excerpt":{"rendered":"<p>VBA\u306eIf\u6587\u3092\u5fb9\u5e95\u89e3\u8aac\u3002If-Then-Else\u30fbElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\uff08And\/Or\/Not\uff09\u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fbSelect Case\u3068\u306e\u4f7f\u3044\u5206\u3051\u307e\u3067\u3002\u3055\u3089\u306bClaude Code\u3067VBA\u306e\u6761\u4ef6\u5206\u5c90\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u30fb\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u65b9\u6cd5\u3082\u89e3\u8aac\u3002<\/p>\n","protected":false},"author":1,"featured_media":17805,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","_lightning_design_setting":[],"footnotes":"","rank_math_description":"VBA\u306eIf\u6587\u3092\u5fb9\u5e95\u89e3\u8aac\u3002If-Then-Else\u30fbElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\uff08And\/Or\/Not\uff09\u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fbSelect Case\u3068\u306e\u4f7f\u3044\u5206\u3051\u307e\u3067\u3002\u3055\u3089\u306bClaude Code\u3067VBA\u306e\u6761\u4ef6\u5206\u5c90\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u30fb\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u65b9\u6cd5\u3082\u89e3\u8aac\u3002","rank_math_focus_keyword":"VBA If\u6587 \u6761\u4ef6\u5206\u5c90","rank_math_title":"\u30102026\u5e748\u6708\u6700\u65b0\u3011VBA\u306eIf\u6587\u5b8c\u5168\u30ac\u30a4\u30c9\uff5cElseIf\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50\u30fb\u30cd\u30b9\u30c8\u30fbClaude Code\u3067\u81ea\u52d5\u751f\u6210\u307e\u3067","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":[2,96,94],"tags":[],"class_list":["post-17806","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-claude-tips","category-96","category-94"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17806","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=17806"}],"version-history":[{"count":8,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17806\/revisions"}],"predecessor-version":[{"id":44886,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17806\/revisions\/44886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/17805"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=17806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=17806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=17806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}