{"id":18443,"date":"2026-07-19T06:24:40","date_gmt":"2026-07-18T21:24:40","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=18443"},"modified":"2026-07-19T06:24:40","modified_gmt":"2026-07-18T21:24:40","slug":"cc-vba-split-string","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-vba-split-string\/","title":{"rendered":"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA Split\u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u8907\u6570\u533a\u5207\u308a\u30fb\u914d\u5217\u64cd\u4f5c\u30fbClaude Code\u6d3b\u7528"},"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-split-string.jpg\" alt=\"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA Split\u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u8907\u6570\u533a\u5207\u308a\u30fb\u914d\u5217\u64cd\u4f5c\u30fbClaude Code\u6d3b\u7528\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-radius:12px;padding:24px 28px;margin:0 0 32px;border-left:4px solid #0ea5e9;\">\n  <p style=\"font-size:15px;font-weight:700;color:#1a1a1a;margin:0 0 16px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9<\/p>\n  <ol style=\"margin:0;padding-left:20px;font-size:14px;line-height:2.2;list-style:none;\">\n    <li><a href=\"#sec-01\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">01<\/span>Split\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u3068\u5f15\u6570\u306e\u610f\u5473<\/a><\/li>\n    <li><a href=\"#sec-02\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">02<\/span>\u5206\u5272\u3057\u305f\u6587\u5b57\u5217\u306e\u53d6\u308a\u51fa\u3057\u65b9\u3068UBound\u306e\u4f7f\u3044\u65b9<\/a><\/li>\n    <li><a href=\"#sec-03\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">03<\/span>\u533a\u5207\u308a\u56de\u6570\u306e\u5236\u9650\uff08Limit\u5f15\u6570\uff09<\/a><\/li>\n    <li><a href=\"#sec-04\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">04<\/span>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\uff08Compare\u5f15\u6570\uff09<\/a><\/li>\n    <li><a href=\"#sec-05\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">05<\/span>\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u3078\u306e\u5bfe\u5fdc\uff08Replace\u95a2\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\uff09<\/a><\/li>\n    <li><a href=\"#sec-06\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">06<\/span>CSV\u30c7\u30fc\u30bf\u306e\u89e3\u6790\u30fb\u30bb\u30eb\u3078\u306e\u5206\u6563\u914d\u7f6e<\/a><\/li>\n    <li><a href=\"#sec-07\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">07<\/span>Split\u95a2\u6570\u306e\u843d\u3068\u3057\u7a74\u3068\u30a8\u30e9\u30fc\u5bfe\u7b56<\/a><\/li>\n    <li><a href=\"#sec-08\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">08<\/span>Claude Code\u3067VBA Split\u51e6\u7406\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/a><\/li>\n    <li><a href=\"#faq\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">FAQ<\/span>\u3088\u304f\u3042\u308b\u8cea\u554f<\/a><\/li>\n  <\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Excel\u306eVBA\u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u3001\u300c\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6587\u5b57\u5217\u3092\u30bb\u30eb\u306b\u5206\u3051\u305f\u3044\u300d\u300c\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u533a\u5207\u3089\u308c\u305f\u65e5\u4ed8\u3092\u5e74\u30fb\u6708\u30fb\u65e5\u306b\u5206\u89e3\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u5834\u9762\u304c\u983b\u7e41\u306b\u51fa\u3066\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u4f7f\u3046\u306e\u304c<strong>Split\u95a2\u6570<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u95a2\u6570\u306f1\u884c\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066\u914d\u5217\u306b\u683c\u7d0d\u3067\u304d\u308b\u305f\u3081\u3001VBA\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u3067\u6b20\u304b\u305b\u306a\u3044\u57fa\u790e\u95a2\u6570\u306e\u4e00\u3064\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Split\u95a2\u6570\u306e\u57fa\u672c\u304b\u3089\u3001\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u3078\u306e\u5bfe\u5fdc\u30fbCSV\u30c7\u30fc\u30bf\u306e\u89e3\u6790\u30fb\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u306e\u5bfe\u7b56\u30fbClaude Code\u3067\u306e\u81ea\u52d5\u30b3\u30fc\u30c9\u751f\u6210\u307e\u3067\u3001\u5b9f\u7528\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u3066\u89e3\u8aac\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\">Split\u95a2\u6570\u306f\u300c\u6587\u5b57\u5217\u3092\u533a\u5207\u308a\u6587\u5b57\u3067\u5206\u5272\u3057\u3066\u914d\u5217\u306b\u3059\u308b\u300d\u3060\u3051\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u95a2\u6570\u3067\u3059\u3002\u899a\u3048\u308b\u30dd\u30a4\u30f3\u30c8\u306f4\u3064\u306e\u5f15\u6570\u306e\u4f7f\u3044\u65b9\u3068UBound\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3059\u3002\u30b3\u30fc\u30c9\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u899a\u3048\u3066\u3057\u307e\u3048\u3070\u5fdc\u7528\u7bc4\u56f2\u304c\u5e83\u304f\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>Split\u95a2\u6570\u306e<strong>\u57fa\u672c\u69cb\u6587\u30fb4\u3064\u306e\u5f15\u6570<\/strong>\uff08Expression\/Delimiter\/Limit\/Compare\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>UBound<\/strong>\u3067\u914d\u5217\u8981\u7d20\u6570\u3092\u78ba\u8a8d\u3057\u3066\u30eb\u30fc\u30d7\u51e6\u7406\u3059\u308b\u65b9\u6cd5<\/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>Limit\u5f15\u6570<\/strong>\u3067\u5206\u5272\u3059\u308b\u6700\u5927\u6570\u3092\u5236\u9650\u3059\u308b\u6d3b\u7528\u30d1\u30bf\u30fc\u30f3<\/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>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225<\/strong>\u3092Compare\u5f15\u6570\u3067\u5236\u5fa1\u3059\u308b\u65b9\u6cd5<\/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>\u8907\u6570\u533a\u5207\u308a\u6587\u5b57<\/strong>\u306b\u5bfe\u5fdc\u3059\u308bReplace\u95a2\u6570\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u30c6\u30af\u30cb\u30c3\u30af<\/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>CSV\u30c7\u30fc\u30bf<\/strong>\u3092Split\u3067\u884c\u30fb\u5217\u306b\u5206\u89e3\u3057\u3066\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3<\/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>\u30a8\u30e9\u30fc\u539f\u56e0\uff08<strong>\u7a7a\u6587\u5b57\u5217\u30fbNull\u5024<\/strong>\uff09\u3068\u9632\u5fa1\u30b3\u30fc\u30c9\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>Claude Code<\/strong>\u3067Split\u51e6\u7406\u3092\u542b\u3080VBA\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/span><\/div>\n\n<\/div>\n\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;\">BASIC SYNTAX<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Split\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u3068\u5f15\u6570\u306e\u610f\u5473<\/span>\n  <span class=\"section-desc\">Expression\u30fbDelimiter\u30fbLimit\u30fbCompare\u306e4\u5f15\u6570\u3092\u62bc\u3055\u3048\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002\u8fd4\u308a\u5024\u306f\u6587\u5b57\u5217\u578b\u306e<strong>1\u6b21\u5143\u914d\u5217\uff08String()\uff09<\/strong>\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  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' Split\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\nDim result() As String\nresult = Split(Expression, [Delimiter], [Limit], [Compare])\n\n' \u5f15\u6570\u306e\u8aac\u660e\n' Expression : \u5206\u5272\u3059\u308b\u5143\u306e\u6587\u5b57\u5217\uff08\u5fc5\u9808\uff09\n' Delimiter  : \u533a\u5207\u308a\u6587\u5b57\uff08\u7701\u7565\u6642\u306f\u30b9\u30da\u30fc\u30b9 \" \"\uff09\n' Limit      : \u6700\u5927\u5206\u5272\u6570\uff08\u7701\u7565\u6642\u306f -1 = \u7121\u5236\u9650\uff09\n' Compare    : \u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\uff08\u7701\u7565\u6642\u306f vbBinaryCompare\uff09\n\n' \u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u4f7f\u3044\u65b9\uff08\u30ab\u30f3\u30de\u533a\u5207\u308a\uff09\nDim items() As String\nitems = Split(\"\u308a\u3093\u3054,\u307f\u304b\u3093,\u3076\u3069\u3046\", \",\")\n' items(0) = \"\u308a\u3093\u3054\"\n' items(1) = \"\u307f\u304b\u3093\"\n' items(2) = \"\u3076\u3069\u3046\"\n\n' \u533a\u5207\u308a\u6587\u5b57\u3092\u7701\u7565\u3059\u308b\u3068\u30b9\u30da\u30fc\u30b9\u3067\u5206\u5272\nDim words() As String\nwords = Split(\"Hello World VBA\")\n' words(0) = \"Hello\"\n' words(1) = \"World\"\n' words(2) = \"VBA\"\n<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>Split\u95a2\u6570\u306e\u8fd4\u308a\u5024\uff081\u6b21\u5143\u914d\u5217\uff09<\/strong>\uff1aSplit\u95a2\u6570\u306fString\u578b\u306e1\u6b21\u5143\u914d\u5217\u3092\u8fd4\u3059\u3002\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f0\u59cb\u307e\u308a\uff080 to n-1\uff09\u3002\u8981\u7d20\u6570\u306fUBound(result)+1\u3067\u53d6\u5f97\u3067\u304d\u308b\u3002\u533a\u5207\u308a\u6587\u5b57\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306f\u5143\u306e\u6587\u5b57\u5217\u5168\u4f53\u304cresult(0)\u306b\u5165\u308a\u3001\u8981\u7d20\u304c1\u3064\u3060\u3051\u306e\u914d\u5217\u306b\u306a\u308b\u3002Null\u3092\u6e21\u3059\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/p>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u5f15\u6570<\/th><th>\u578b<\/th><th>\u30c7\u30d5\u30a9\u30eb\u30c8<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Expression<\/td><td>String<\/td><td>\u306a\u3057\uff08\u5fc5\u9808\uff09<\/td><td>\u5206\u5272\u3059\u308b\u5143\u306e\u6587\u5b57\u5217<\/td><\/tr>\n<tr><td>Delimiter<\/td><td>String<\/td><td>\" \"\uff08\u30b9\u30da\u30fc\u30b9\uff09<\/td><td>\u533a\u5207\u308a\u6587\u5b57\uff08\"\"\u3092\u6307\u5b9a\u3059\u308b\u30681\u6587\u5b57\u305a\u3064\u5206\u5272\uff09<\/td><\/tr>\n<tr><td>Limit<\/td><td>Long<\/td><td>-1\uff08\u7121\u5236\u9650\uff09<\/td><td>\u6700\u5927\u4f55\u500b\u306b\u5206\u5272\u3059\u308b\u304b\u3002-1=\u3059\u3079\u3066\u5206\u5272<\/td><\/tr>\n<tr><td>Compare<\/td><td>vbCompareMethod<\/td><td>vbBinaryCompare<\/td><td>vbTextCompare=\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u7121\u8996\u3001vbBinaryCompare=\u533a\u5225<\/td><\/tr>\n<\/tbody>\n<\/table>\n\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;\">UBOUND<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u5206\u5272\u3057\u305f\u6587\u5b57\u5217\u306e\u53d6\u308a\u51fa\u3057\u65b9\u3068UBound\u306e\u4f7f\u3044\u65b9<\/span>\n  <span class=\"section-desc\">\u8981\u7d20\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u306e\u30a2\u30af\u30bb\u30b9\u3068For\u30eb\u30fc\u30d7\u3067\u306e\u5168\u8981\u7d20\u51e6\u7406<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u95a2\u6570\u304c\u8fd4\u3059\u914d\u5217\u306e\u8981\u7d20\u306b\u306f\u3001<code>\u5909\u6570\u540d(\u30a4\u30f3\u30c7\u30c3\u30af\u30b9)<\/code>\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f<strong>0\u304b\u3089\u59cb\u307e\u308b<\/strong>\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u914d\u5217\u306e\u8981\u7d20\u6570\u306f<code>UBound(\u914d\u5217\u540d) + 1<\/code>\u3067\u53d6\u5f97\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>UBound\u95a2\u6570<\/strong>\uff1aUBound(arrayname, [dimension])\uff1a\u914d\u5217\u306e\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08\u4e0a\u9650\uff09\u3092\u8fd4\u3059\u95a2\u6570\u30021\u6b21\u5143\u914d\u5217\u306e\u5834\u5408\u3001UBound(arr)\u306f\u6700\u5f8c\u306e\u8981\u7d20\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8fd4\u3059\u3002\u8981\u7d20\u6570\u306fUBound(arr)+1\u3002LBound\u95a2\u6570\u306f\u6700\u5c0f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08\u901a\u5e380\uff09\u3092\u8fd4\u3059\u3002Split\u95a2\u6570\u306e\u7d50\u679c\u306fLBound=0\u306e\u305f\u3081\u3001\u901a\u5e38\u306fUBound\u306e\u307f\u4f7f\u3048\u3070\u5341\u5206\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' UBound\u3092\u4f7f\u3063\u3066\u5168\u8981\u7d20\u3092\u30eb\u30fc\u30d7\u51e6\u7406\u3059\u308b\nSub SplitLoopExample()\n    Dim csv As String\n    Dim items() As String\n    Dim i As Long\n\n    csv = \"\u6771\u4eac,\u5927\u962a,\u540d\u53e4\u5c4b,\u798f\u5ca1,\u672d\u5e4c\"\n    items = Split(csv, \",\")\n\n    ' \u8981\u7d20\u6570\u3092\u78ba\u8a8d\n    Debug.Print \"\u8981\u7d20\u6570: \" & UBound(items) + 1  ' \u2192 5\n\n    ' For Each\u3067\u30eb\u30fc\u30d7\uff08\u5168\u8981\u7d20\u3092\u9806\u306b\u51e6\u7406\uff09\n    Dim item As Variant\n    For Each item In items\n        Debug.Print item\n    Next item\n    ' \u2192 \u6771\u4eac \/ \u5927\u962a \/ \u540d\u53e4\u5c4b \/ \u798f\u5ca1 \/ \u672d\u5e4c\n\n    ' \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6307\u5b9a\u30eb\u30fc\u30d7\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u4f7f\u3044\u305f\u3044\u5834\u5408\uff09\n    For i = 0 To UBound(items)\n        Cells(i + 1, 1).Value = items(i)  ' A1:A5\u306b\u66f8\u304d\u8fbc\u3080\n    Next i\nEnd Sub\n\n' \u7279\u5b9a\u306e\u8981\u7d20\u3060\u3051\u53d6\u308a\u51fa\u3059\nSub GetSpecificElement()\n    Dim path As String\n    Dim parts() As String\n\n    path = \"C:\\Users\\kohei\\Documents\\report.xlsx\"\n    parts = Split(path, \"\\\")\n\n    ' \u30d5\u30a1\u30a4\u30eb\u540d\u3060\u3051\u53d6\u5f97\uff08\u6700\u5f8c\u306e\u8981\u7d20\uff09\n    Dim filename As String\n    filename = parts(UBound(parts))  ' \u2192 \"report.xlsx\"\n    Debug.Print \"\u30d5\u30a1\u30a4\u30eb\u540d: \" & filename\nEnd Sub<\/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\">Split\u95a2\u6570\u306e\u8fd4\u308a\u5024\u306fVariant\u578b\u3067\u306f\u306a\u304fString\u578b\u306e\u914d\u5217\u306a\u306e\u3067\u3001\u8981\u7d20\u306e\u30a2\u30af\u30bb\u30b9\u306fitems(0)\u306e\u3088\u3046\u306b\u76f4\u63a5\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3048\u307e\u3059\u3002Variant\u914d\u5217\u306b\u3057\u3066For Each\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u306f\u300cDim item As Variant\u300d\u3067\u5ba3\u8a00\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u6587\u5b57\u5217\u3092Split\u3067\u5206\u5272<\/strong><br><span style=\"font-size:12px;\">items = Split(str, \",\")<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>UBound\u3067\u8981\u7d20\u6570\u78ba\u8a8d<\/strong><br><span style=\"font-size:12px;\">n = UBound(items)+1<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>For i = 0 To UBound<\/strong><br><span style=\"font-size:12px;\">\u5168\u8981\u7d20\u3092\u30eb\u30fc\u30d7\u51e6\u7406<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>items(i)\u3067\u8981\u7d20\u53d6\u5f97<\/strong><br><span style=\"font-size:12px;\">\u30bb\u30eb\u3078\u306e\u66f8\u8fbc\u307f\u7b49<\/span><\/div>\n<\/div>\n\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;\">LIMIT ARG<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u533a\u5207\u308a\u56de\u6570\u306e\u5236\u9650\uff08Limit\u5f15\u6570\uff09<\/span>\n  <span class=\"section-desc\">\u6700\u521d\u306eN\u500b\u3060\u3051\u5206\u5272\u3059\u308b\u6d3b\u7528\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Limit\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001<strong>\u6700\u5927\u4f55\u500b\u306b\u5206\u5272\u3059\u308b\u304b<\/strong>\u3092\u5236\u9650\u3067\u304d\u307e\u3059\u3002Limit=2\u306b\u3059\u308b\u3068\u300c\u6700\u521d\u306e\u533a\u5207\u308a\u6587\u5b57\u30671\u56de\u3060\u3051\u5206\u5272\u3057\u30662\u8981\u7d20\u306e\u914d\u5217\u300d\u306b\u306a\u308a\u307e\u3059\u3002\u6b8b\u308a\u306e\u6587\u5b57\u5217\u306f\u6700\u5f8c\u306e\u8981\u7d20\u306b\u305d\u306e\u307e\u307e\u683c\u7d0d\u3055\u308c\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  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' Limit\u5f15\u6570\u3067\u5206\u5272\u6570\u3092\u5236\u9650\u3059\u308b\nSub LimitExample()\n    Dim str As String\n    Dim parts() As String\n\n    str = \"2026\/07\/19\"\n\n    ' Limit=-1\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09: \u3059\u3079\u3066\u5206\u5272\n    parts = Split(str, \"\/\", -1)\n    Debug.Print UBound(parts) + 1  ' \u2192 3\n    ' parts(0)=\"2026\" \/ parts(1)=\"07\" \/ parts(2)=\"19\"\n\n    ' Limit=2: \u6700\u521d\u306e1\u304b\u6240\u3060\u3051\u5206\u5272\uff082\u8981\u7d20\uff09\n    parts = Split(str, \"\/\", 2)\n    Debug.Print UBound(parts) + 1  ' \u2192 2\n    ' parts(0)=\"2026\" \/ parts(1)=\"07\/19\"\uff08\u6b8b\u308a\u306f\u305d\u306e\u307e\u307e\uff09\n\n    ' Limit=1: \u5206\u5272\u306a\u3057\uff08\u5143\u306e\u6587\u5b57\u5217\u304c0\u756a\u76ee\u306b\u5165\u308b\uff09\n    parts = Split(str, \"\/\", 1)\n    Debug.Print UBound(parts) + 1  ' \u2192 1\n    ' parts(0)=\"2026\/07\/19\"\uff08\u5206\u5272\u3055\u308c\u306a\u3044\uff09\n\nEnd Sub\n\n' \u6d3b\u7528\u4f8b: \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30c9\u30e1\u30a4\u30f3\u3060\u3051\u53d6\u5f97\nSub GetDomain()\n    Dim email As String\n    Dim parts() As String\n\n    email = \"sugasawa.kohei@genai-ai.co.jp\"\n\n    ' \"@\"\u30672\u3064\u306b\u5206\u5272\u3057\u3066\u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3092\u53d6\u5f97\n    parts = Split(email, \"@\", 2)\n    ' parts(0) = \"sugasawa.kohei\"\n    ' parts(1) = \"genai-ai.co.jp\"\n\n    Debug.Print \"\u30c9\u30e1\u30a4\u30f3: \" & parts(1)  ' \u2192 genai-ai.co.jp\nEnd Sub<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">Limit\u5f15\u6570\u306e\u5b9f\u7528\u30d1\u30bf\u30fc\u30f3<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u300c\u6700\u521d\u306e\u533a\u5207\u308a\u6587\u5b57\u307e\u3067\u300d\u3068\u300c\u305d\u308c\u4ee5\u964d\u306e\u6b8b\u308a\u300d\u306b2\u5206\u5272\u3057\u305f\u3044\u5834\u5408\u306fLimit=2\u304c\u4fbf\u5229\u3067\u3059\u3002\u4f8b\u3048\u3070\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u300c@\u300d\u3067\u5206\u5272\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30c9\u30e1\u30a4\u30f3\u306b\u5206\u3051\u308b\u3001URL\u3092\u300c:\/\/\u300d\u3067\u5206\u5272\u3057\u3066\u30b9\u30ad\u30fc\u30e0\u3068\u30d1\u30b9\u90e8\u5206\u306b\u5206\u3051\u308b\u306a\u3069\u3001\u300c\u6700\u521d\u306e\u533a\u5207\u308a\u3060\u3051\u898b\u305f\u3044\u300d\u30b1\u30fc\u30b9\u3067\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div id=\"sec-04\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">04<\/span>\n  <span class=\"section-label\" style=\"display:block;\">COMPARE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\uff08Compare\u5f15\u6570\uff09<\/span>\n  <span class=\"section-desc\">vbTextCompare vs vbBinaryCompare \u306e\u4f7f\u3044\u5206\u3051<\/span>\n<\/h2>\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>vbBinaryCompare \u3068 vbTextCompare<\/strong>\uff1avbBinaryCompare\uff08=0\uff09\u306f\u30d0\u30a4\u30ca\u30ea\u6bd4\u8f03\u3002\u300cA\u300d\u3068\u300ca\u300d\u3092\u5225\u306e\u6587\u5b57\u3068\u3057\u3066\u533a\u5225\u3059\u308b\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09\u3002vbTextCompare\uff08=1\uff09\u306f\u30c6\u30ad\u30b9\u30c8\u6bd4\u8f03\u3002\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u3066\u4e00\u81f4\u3059\u308b\u3002\u4f8b\u3048\u3070Split(\"AaA\", \"a\", -1, vbTextCompare)\u306f\"A\"\u3082\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u6271\u30443\u8981\u7d20\u306b\u5206\u5272\u3055\u308c\u308b\u304c\u3001vbBinaryCompare\u3067\u306f\"A\"\u306f\u533a\u5207\u308a\u306b\u306a\u3089\u306a\u3044\u3002\u65e5\u672c\u8a9e\u306e\u3072\u3089\u304c\u306a\/\u30ab\u30bf\u30ab\u30ca\u306e\u533a\u5225\u306f\u3053\u306e\u5f15\u6570\u3067\u306f\u5236\u5fa1\u3067\u304d\u306a\u3044\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' Compare\u5f15\u6570\u3067\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\u3092\u5236\u5fa1\u3059\u308b\nSub CompareExample()\n    Dim str As String\n    Dim partsB() As String, partsT() As String\n\n    str = \"HelloAworldAtest\"  ' \"A\"\u304c\u533a\u5207\u308a\u6587\u5b57\n\n    ' vbBinaryCompare\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09: \u5927\u6587\u5b57\u306eA\u306e\u307f\u304c\u533a\u5207\u308a\n    partsB = Split(str, \"a\", -1, vbBinaryCompare)\n    Debug.Print UBound(partsB) + 1  ' \u2192 1\uff08\u5c0f\u6587\u5b57a\u3057\u304b\u306a\u3044\u306e\u3067\u5206\u5272\u3055\u308c\u306a\u3044\uff09\n    ' partsB(0) = \"HelloAworldAtest\"\uff08A\u306f\u533a\u5207\u308a\u306b\u306a\u3089\u306a\u3044\uff09\n\n    ' vbTextCompare: \u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3001A\/a\u3069\u3061\u3089\u3082\u533a\u5207\u308a\n    partsT = Split(str, \"a\", -1, vbTextCompare)\n    Debug.Print UBound(partsT) + 1  ' \u2192 3\n    ' partsT(0)=\"Hello\" \/ partsT(1)=\"world\" \/ partsT(2)=\"test\"\n\nEnd Sub\n\n' \u5b9f\u7528\u4f8b: CSV\u306e\u5217\u540d\uff08\u82f1\u8a9e\u30d8\u30c3\u30c0\u30fc\uff09\u3092\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u7121\u8996\u3067\u51e6\u7406\nSub ParseHeaderIgnoreCase()\n    Dim header As String\n    Dim cols() As String\n\n    header = \"Name,EMAIL,Phone,Address\"\n    cols = Split(header, \",\")\n\n    Dim i As Long\n    For i = 0 To UBound(cols)\n        cols(i) = LCase(cols(i))  ' \u5168\u90e8\u5c0f\u6587\u5b57\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089\u51e6\u7406\n    Next i\n    ' cols(0)=\"name\" \/ cols(1)=\"email\" \/ cols(2)=\"phone\" \/ cols(3)=\"address\"\nEnd Sub<\/pre>\n<\/div>\n\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;\">MULTI DELIMITERS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u3078\u306e\u5bfe\u5fdc\uff08Replace\u95a2\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\uff09<\/span>\n  <span class=\"section-desc\">\u30ab\u30f3\u30de\u30fb\u30b9\u30da\u30fc\u30b9\u30fb\u30bf\u30d6\u306a\u3069\u8907\u6570\u306e\u533a\u5207\u308a\u306b\u5bfe\u5fdc\u3059\u308b\u5b9f\u7528\u30c6\u30af\u30cb\u30c3\u30af<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u95a2\u6570\u306f<strong>\u533a\u5207\u308a\u6587\u5b57\u30921\u3064\u3057\u304b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093<\/strong>\u3002\u300c\u30ab\u30f3\u30de\u3067\u3082\u30b9\u30da\u30fc\u30b9\u3067\u3082\u5206\u5272\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u5834\u5408\u306f\u3001<strong>Replace\u95a2\u6570\u3067\u4e00\u65b9\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u3082\u3046\u4e00\u65b9\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089Split\u3059\u308b<\/strong>\u306e\u304c\u57fa\u672c\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">Split\u95a2\u6570\u306f\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u3092\u76f4\u63a5\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">Split(str, \",|; \")\u306e\u3088\u3046\u306b\u30d1\u30a4\u30d7\u3067\u8907\u6570\u6307\u5b9a\u3057\u3066\u3082\u52d5\u4f5c\u3057\u307e\u305b\u3093\uff08\",\"\u3068\"; \"\u306e\u56fa\u5b9a\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\uff09\u3002\u6b63\u898f\u8868\u73fe\u306e\u3088\u3046\u306a\u8907\u6570\u533a\u5207\u308a\u6307\u5b9a\u306fVBA\u6a19\u6e96\u306eSplit\u306b\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002VBScript\u306eRegExp\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3046\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c\u3001Replace\u3067\u7d71\u4e00\u3059\u308b\u307b\u3046\u304c\u9ad8\u901f\u3067\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' \u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u306b\u5bfe\u5fdc\u3059\u308b\u65b9\u6cd5\n\n' \u65b9\u6cd51: Replace\u3067\u533a\u5207\u308a\u6587\u5b57\u30921\u7a2e\u985e\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089Split\nSub MultiDelimiterExample()\n    Dim str As String\n    Dim parts() As String\n\n    ' \u30ab\u30f3\u30de\u3068\u30bb\u30df\u30b3\u30ed\u30f3\u306e\u6df7\u5728\u30c7\u30fc\u30bf\n    str = \"\u6771\u4eac,\u5927\u962a;\u540d\u53e4\u5c4b,\u798f\u5ca1;\u672d\u5e4c\"\n\n    ' \u30bb\u30df\u30b3\u30ed\u30f3\u3092\u30ab\u30f3\u30de\u306b\u7f6e\u63db\u3057\u3066\u304b\u3089Split\n    str = Replace(str, \";\", \",\")\n    parts = Split(str, \",\")\n    ' parts: \u6771\u4eac\/\u5927\u962a\/\u540d\u53e4\u5c4b\/\u798f\u5ca1\/\u672d\u5e4c\n\n    Debug.Print UBound(parts) + 1  ' \u2192 5\n\nEnd Sub\n\n' \u65b9\u6cd52: \u8907\u6570\u533a\u5207\u308a\u3092\u6bb5\u968e\u7684\u306bReplace\u3067\u7d71\u4e00\nSub NormalizeDelimiters()\n    Dim str As String\n    Dim parts() As String\n\n    ' \u30bf\u30d6\u30fb\u30b9\u30da\u30fc\u30b9\u30fb\u30ab\u30f3\u30de\u304c\u6df7\u5728\u3057\u305fCSV\u7684\u306a\u30c7\u30fc\u30bf\n    str = \"Apple\" & vbTab & \"Banana, Cherry \" & Chr(9) & \"Date\"\n\n    ' \u5168\u3066\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\"|\"\u306b\u7d71\u4e00\n    str = Replace(str, vbTab, \"|\")   ' \u30bf\u30d6\u2192|\n    str = Replace(str, \" \", \"|\")    ' \u30b9\u30da\u30fc\u30b9\u2192|\n    str = Replace(str, \",\", \"|\")    ' \u30ab\u30f3\u30de\u2192|\n\n    ' \u9023\u7d9a\u3057\u305f\"|\"\u304c\u3042\u308b\u5834\u5408\u306f1\u3064\u306b\uff08\u8907\u6570\u30b9\u30da\u30fc\u30b9\u5bfe\u7b56\uff09\n    Do While InStr(str, \"||\") > 0\n        str = Replace(str, \"||\", \"|\")\n    Loop\n\n    parts = Split(str, \"|\")\n    ' \u7d50\u679c: Apple \/ Banana \/ Cherry \/ Date\n\n    Dim i As Long\n    For i = 0 To UBound(parts)\n        If Trim(parts(i)) <> \"\" Then  ' \u7a7a\u8981\u7d20\u3092\u30b9\u30ad\u30c3\u30d7\n            Debug.Print Trim(parts(i))\n        End If\n    Next i\n\nEnd Sub\n\n' \u65b9\u6cd53: RegExp\u3067\u8907\u6570\u533a\u5207\u308a\u306b\u5bfe\u5fdc\uff08\u4e0a\u7d1a\u8005\u5411\u3051\uff09\nSub SplitWithRegEx()\n    Dim re As Object\n    Dim matches As Object\n    Dim result() As String\n\n    Set re = CreateObject(\"VBScript.RegExp\")\n    re.Pattern = \"[,;| ]+\"  ' \u30ab\u30f3\u30de\u30fb\u30bb\u30df\u30b3\u30ed\u30f3\u30fb\u30d1\u30a4\u30d7\u30fb\u7a7a\u767d\uff081\u6587\u5b57\u4ee5\u4e0a\uff09\n    re.Global = True\n\n    Dim str As String\n    str = \"Apple,Banana;Cherry Date\"\n\n    ' Replace\u3067\u4e00\u62ec\u7d71\u4e00\u3057\u3066Split\n    Dim normalized As String\n    normalized = re.Replace(str, \"|\")\n    result = Split(normalized, \"|\")\n    ' result: Apple \/ Banana \/ Cherry \/ Date\n\n    Dim i As Long\n    For i = 0 To UBound(result)\n        Debug.Print result(i)\n    Next i\nEnd Sub<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>Chr(9)\u3068vbTab<\/strong>\uff1avbTab\u306f\u30bf\u30d6\u6587\u5b57\u306e\u5b9a\u6570\uff08Chr(9)\u3068\u540c\u5024\uff09\u3002Excel\u306e\u30bb\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066VBA\u306e\u6587\u5b57\u5217\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3068\u30bb\u30eb\u9593\u306e\u533a\u5207\u308a\u304c\u30bf\u30d6\u6587\u5b57\uff08vbTab\uff09\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3002Replace(str, vbTab, \",\")\u3067CSV\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3066\u304b\u3089Split\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u304c\u5b9f\u52d9\u3067\u3088\u304f\u51fa\u308b\u3002\u540c\u69d8\u306bvbCrLf\uff08\u6539\u884c+CR\uff09\u3001vbLf\uff08\u6539\u884c\u306e\u307f\uff09\u3082Replace\u3067\u51e6\u7406\u3057\u3066\u304b\u3089\u884c\u3054\u3068\u306bSplit\u3059\u308b\u306e\u304c\u57fa\u672c\u3002<\/p>\n<\/div>\n\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;\">CSV PARSE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">CSV\u30c7\u30fc\u30bf\u306e\u89e3\u6790\u30fb\u30bb\u30eb\u3078\u306e\u5206\u6563\u914d\u7f6e<\/span>\n  <span class=\"section-desc\">\u884c\u30fb\u52172\u91cdSplit\u30672\u6b21\u5143\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u306e\u6700\u3082\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u65b9\u306e\u4e00\u3064\u304c<strong>CSV\u30c7\u30fc\u30bf\u306e\u89e3\u6790<\/strong>\u3067\u3059\u3002\u307e\u305a\u6539\u884c\u3067\u884c\u306b\u5206\u5272\u3057\u3001\u5404\u884c\u3092\u30ab\u30f3\u30de\u3067\u5217\u306b\u5206\u5272\u3059\u308b\u3068\u3044\u3046\u300c2\u91cdSplit\u300d\u306e\u30d1\u30bf\u30fc\u30f3\u304c\u57fa\u672c\u306b\u306a\u308a\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  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' CSV\u30c7\u30fc\u30bf\u3092\u30bb\u30eb\u306b\u5c55\u958b\u3059\u308b\nSub ParseCSVToSheet()\n    Dim csvText As String\n    Dim lines() As String\n    Dim cols() As String\n    Dim i As Long, j As Long\n\n    ' CSV\u6587\u5b57\u5217\uff08\u5b9f\u969b\u306f\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u8aad\u307f\u8fbc\u3080\uff09\n    csvText = \"\u540d\u524d,\u5e74\u9f62,\u90e8\u7f72\" & vbCrLf & _\n              \"\u83c5\u6fa4\u5b5d\u5e73,24,\u55b6\u696d\" & vbCrLf & _\n              \"\u5c71\u5d0e\u592a\u90ce,32,\u958b\u767a\" & vbCrLf & _\n              \"\u7530\u4e2d\u82b1\u5b50,28,\u7dcf\u52d9\"\n\n    ' Step1: \u6539\u884c\u30b3\u30fc\u30c9\u3067\u884c\u306b\u5206\u5272\n    lines = Split(csvText, vbCrLf)\n\n    ' Step2: \u5404\u884c\u3092\u30ab\u30f3\u30de\u3067\u5217\u306b\u5206\u5272\u3057\u3066\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080\n    For i = 0 To UBound(lines)\n        If lines(i) <> \"\" Then  ' \u7a7a\u884c\u3092\u30b9\u30ad\u30c3\u30d7\n            cols = Split(lines(i), \",\")\n            For j = 0 To UBound(cols)\n                Cells(i + 1, j + 1).Value = cols(j)\n            Next j\n        End If\n    Next i\n\n    Debug.Print \"\u5b8c\u4e86: \" & (UBound(lines) + 1) & \"\u884c\u3092\u5c55\u958b\"\nEnd Sub\n\n' \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089CSV\u3092\u8aad\u307f\u8fbc\u3093\u3067\u5c55\u958b\u3059\u308b\nSub ReadCSVFile()\n    Dim fileNo As Integer\n    Dim filePath As String\n    Dim allText As String\n    Dim lines() As String\n    Dim cols() As String\n    Dim i As Long, j As Long\n\n    filePath = \"C:\\Users\\kohei\\Documents\\data.csv\"\n    fileNo = FreeFile\n\n    Open filePath For Input As #fileNo\n    allText = Input(LOF(fileNo), fileNo)  ' \u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u8aad\u307f\u8fbc\u307f\n    Close #fileNo\n\n    ' \u6539\u884c\u30b3\u30fc\u30c9\u3092\u7d71\u4e00\uff08\\r\\n\u3068\\n\u306e\u6df7\u5728\u3092\u9632\u3050\uff09\n    allText = Replace(allText, vbCr, \"\")  ' \\r\u3092\u9664\u53bb\n    lines = Split(allText, vbLf)  ' \\n\u3067\u884c\u5206\u5272\n\n    Sheets(\"Sheet1\").Cells.Clear  ' \u30b7\u30fc\u30c8\u3092\u30af\u30ea\u30a2\n\n    For i = 0 To UBound(lines)\n        If Trim(lines(i)) <> \"\" Then\n            cols = Split(lines(i), \",\")\n            For j = 0 To UBound(cols)\n                ' \u30af\u30a9\u30fc\u30c8\u3092\u9664\u53bb\u3057\u3066\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080\n                Cells(i + 1, j + 1).Value = Replace(cols(j), Chr(34), \"\")\n            Next j\n        End If\n    Next i\n\n    MsgBox UBound(lines) & \"\u884c\u306eCSV\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3057\u305f\u3002\"\nEnd Sub<\/pre>\n<\/div>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080<\/strong><br><span style=\"font-size:12px;\">Open\/Input\/Close<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u6539\u884c\u30b3\u30fc\u30c9\u3067\u884c\u5206\u5272<\/strong><br><span style=\"font-size:12px;\">Split(text, vbCrLf)<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u5404\u884c\u3092\u30ab\u30f3\u30de\u3067\u5217\u5206\u5272<\/strong><br><span style=\"font-size:12px;\">Split(line, \",\")<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080<\/strong><br><span style=\"font-size:12px;\">Cells(i, j).Value<\/span><\/div>\n<\/div>\n\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;\">ERROR HANDLING<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Split\u95a2\u6570\u306e\u843d\u3068\u3057\u7a74\u3068\u30a8\u30e9\u30fc\u5bfe\u7b56<\/span>\n  <span class=\"section-desc\">\u7a7a\u6587\u5b57\u5217\u30fbNull\u30fb\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u8d85\u904e\u306e3\u5927\u30a8\u30e9\u30fc\u3092\u9632\u3050<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">Split\u95a2\u6570\u306e3\u5927\u30a8\u30e9\u30fc<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u2460Null\u5024\u3092\u6e21\u3059\u3068\u30a8\u30e9\u30fc\uff08\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u300d\uff09\u3002IsNull()\u3067\u30ac\u30fc\u30c9\u3059\u308b\u3002\u2461\u7a7a\u6587\u5b57\u5217(\"\")\u3092\u6e21\u3059\u3068\u5206\u5272\u3055\u308c\u305a1\u8981\u7d20\u306b\u306a\u308b\u3002UBound=0\u306b\u306a\u308b\u306e\u3067\u8981\u6ce8\u610f\u3002\u2462\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8d85\u3048\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u30a8\u30e9\u30fc\uff08\u300c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6709\u52b9\u7bc4\u56f2\u306b\u3042\u308a\u307e\u305b\u3093\u300d\uff09\u3002UBound\u3067\u4e0a\u9650\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' \u30a8\u30e9\u30fc\u5bfe\u7b56\u30d1\u30bf\u30fc\u30f3\u96c6\n\n' 1. Null\u5024\u30c1\u30a7\u30c3\u30af\nSub SafeSplitWithNull()\n    Dim cellValue As Variant\n    Dim parts() As String\n\n    cellValue = Cells(1, 1).Value  ' \u30bb\u30eb\u304cNull\u306e\u53ef\u80fd\u6027\n\n    ' IsNull\u30c1\u30a7\u30c3\u30af\u3092\u5148\u306b\u884c\u3046\n    If IsNull(cellValue) Or cellValue = \"\" Then\n        Debug.Print \"\u7a7a\u307e\u305f\u306fNull: \u30b9\u30ad\u30c3\u30d7\"\n        Exit Sub\n    End If\n\n    parts = Split(CStr(cellValue), \",\")\n    Debug.Print \"\u5206\u5272\u7d50\u679c: \" & UBound(parts) + 1 & \"\u8981\u7d20\"\nEnd Sub\n\n' 2. \u7a7a\u6587\u5b57\u5217\u306e\u51e6\u7406\uff08\u533a\u5207\u308a\u6587\u5b57\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\uff09\nSub HandleEmptyResult()\n    Dim str As String\n    Dim parts() As String\n\n    str = \"\u533a\u5207\u308a\u6587\u5b57\u306a\u3057\u306e\u30c6\u30ad\u30b9\u30c8\"\n    parts = Split(str, \",\")  ' \u30ab\u30f3\u30de\u304c\u306a\u3044\u306e\u3067\u5206\u5272\u3055\u308c\u306a\u3044\n\n    ' \u8981\u7d20\u6570\u3092\u78ba\u8a8d\n    If UBound(parts) = 0 Then\n        Debug.Print \"\u533a\u5207\u308a\u6587\u5b57\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f: \" & parts(0)\n    Else\n        Debug.Print \"\u5206\u5272\u6570: \" & UBound(parts) + 1\n    End If\nEnd Sub\n\n' 3. \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u8d85\u904e\u3092\u9632\u3050\u5b89\u5168\u306a\u30a2\u30af\u30bb\u30b9\nSub SafeIndexAccess()\n    Dim str As String\n    Dim parts() As String\n\n    str = \"\u9805\u76ee1,\u9805\u76ee2\"  ' 2\u8981\u7d20\n    parts = Split(str, \",\")\n\n    ' UBound\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u30a2\u30af\u30bb\u30b9\n    Dim targetIndex As Long\n    targetIndex = 3  ' \u5b58\u5728\u3057\u306a\u3044\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\n\n    If targetIndex <= UBound(parts) Then\n        Debug.Print parts(targetIndex)\n    Else\n        Debug.Print \"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 \" & targetIndex & \" \u306f\u5b58\u5728\u3057\u306a\u3044\uff08\u6700\u5927 \" & UBound(parts) & \"\uff09\"\n    End If\nEnd Sub\n\n' 4. \u7a7a\u306e\u914d\u5217\u8981\u7d20\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\nSub FilterEmptyElements()\n    Dim str As String\n    Dim parts() As String\n    Dim cleaned As New Collection\n\n    str = \"A,,B,,,C,\"  ' \u7a7a\u8981\u7d20\u3042\u308a\n    parts = Split(str, \",\")\n\n    Dim i As Long\n    For i = 0 To UBound(parts)\n        If Trim(parts(i)) <> \"\" Then\n            cleaned.Add Trim(parts(i))\n        End If\n    Next i\n\n    Debug.Print \"\u6709\u52b9\u8981\u7d20\u6570: \" & cleaned.Count  ' \u2192 3 (A, B, C)\nEnd Sub<\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>IsNull\u95a2\u6570\u3068IsEmpty\u95a2\u6570\u306e\u9055\u3044<\/strong>\uff1aIsNull(value)\u306fVariant\u578b\u306e\u5909\u6570\u304cNull\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002\u30bb\u30eb\u306e\u5024\u304cNull\u306e\u5834\u5408\u306fIsNull\u3067True\u306b\u306a\u308b\u3002IsEmpty(value)\u306fVariant\u578b\u304c\u672a\u521d\u671f\u5316\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002\u30bb\u30eb\u304c\u7a7a\u306e\u5834\u5408\u306fIsEmpty\u3067True\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3002\u7a7a\u6587\u5b57\u5217(\"\")\u3068\u306e\u9055\u3044\u306b\u6ce8\u610f: \"\"\u306fIsNull\u3082IsEmpty\u3082False\u3092\u8fd4\u3059\u3002Split\u95a2\u6570\u306b\u6e21\u3059\u524d\u306f IsNull(v) Or IsEmpty(v) Or v = \"\" \u306e3\u6761\u4ef6\u3067\u30ac\u30fc\u30c9\u3059\u308b\u306e\u304c\u5b89\u5168\u3002<\/p>\n<\/div>\n\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;\">AI ASSIST<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Claude Code\u3067VBA Split\u51e6\u7406\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u51e6\u7406\u306e\u4ed5\u69d8\u3092\u4f1d\u3048\u308b\u3060\u3051\u3067Split+\u30eb\u30fc\u30d7\u30b3\u30fc\u30c9\u304c\u5373\u751f\u6210\u3055\u308c\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Claude Code<\/strong>\u3092\u4f7f\u3048\u3070\u3001\u300c\u3069\u3093\u306a\u30c7\u30fc\u30bf\u3092\u300d\u300c\u4f55\u3067\u5206\u5272\u3057\u3066\u300d\u300c\u3069\u3046\u51e6\u7406\u3059\u308b\u304b\u300d\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u3001Split\u95a2\u6570\u3092\u542b\u3080VBA\u30b3\u30fc\u30c9\u304c\u5373\u5ea7\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u30a8\u30e9\u30fc\u5bfe\u7b56\u30b3\u30fc\u30c9\u3084UBound\u306b\u3088\u308b\u5b89\u5168\u306a\u30eb\u30fc\u30d7\u3082\u81ea\u52d5\u3067\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/th><th>Claude Code\u3078\u306e\u6307\u793a\u4f8b<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>CSV\u3092\u30b7\u30fc\u30c8\u306b\u5c55\u958b<\/td><td>\u300cA\u5217\u306bCSV\u6587\u5b57\u5217\u304c\u3042\u308a\u307e\u3059\u3002\u30ab\u30f3\u30de\u3067\u5206\u5272\u3057\u30661\u884c\u305a\u3064B\u5217\u304b\u3089I\u5217\u306b\u5c55\u958b\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u4f5c\u3063\u3066\u3002\u7a7a\u884c\u306f\u30b9\u30ad\u30c3\u30d7\u3002\u300d<\/td><\/tr>\n<tr><td>\u8907\u6570\u533a\u5207\u308a\u5bfe\u5fdc<\/td><td>\u300c\u30ab\u30f3\u30de\u307e\u305f\u306f\u30bb\u30df\u30b3\u30ed\u30f3\u3067\u533a\u5207\u3089\u308c\u305f\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u683c\u7d0d\u3059\u308bVBA\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3002\u7a7a\u8981\u7d20\u306f\u9664\u5916\u3002\u300d<\/td><\/tr>\n<tr><td>\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u62bd\u51fa<\/td><td>\u300cWindows\u306e\u30d5\u30eb\u30d1\u30b9\u6587\u5b57\u5217\u304b\u3089\\\u3067\u5206\u5272\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u3060\u3051\u53d6\u5f97\u3059\u308bVBA\u95a2\u6570\u3092\u66f8\u3044\u3066\u3002\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u306b\u6ce8\u610f\u3002\u300d<\/td><\/tr>\n<tr><td>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u51e6\u7406<\/td><td>\u300c\u30bb\u30eb\u7bc4\u56f2\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3089@\u3067Split\u3057\u3066\u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u3060\u3051\u96a3\u306e\u5217\u306b\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed\u3092\u4f5c\u3063\u3066\u3002Null\/\u7a7a\u30bb\u30eb\u306f\u30b9\u30ad\u30c3\u30d7\u3002\u300d<\/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  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\">' Claude Code\u304c\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u4f8b\u306e\u30d1\u30bf\u30fc\u30f3\n' \uff08\u6307\u793a: \u300cA\u5217\u306e\u30ab\u30f3\u30de\u533a\u5207\u308a\u6587\u5b57\u5217\u3092B\u5217\u4ee5\u964d\u306b\u5c55\u958b\u3059\u308b\u30de\u30af\u30ed\u300d\uff09\n\nSub SplitColumnA()\n    Dim ws As Worksheet\n    Dim lastRow As Long\n    Dim i As Long\n    Dim cellVal As String\n    Dim parts() As String\n    Dim j As Long\n\n    Set ws = ActiveSheet\n    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row\n\n    For i = 1 To lastRow\n        ' Null\u30fb\u7a7a\u30c1\u30a7\u30c3\u30af\n        If Not IsNull(ws.Cells(i, 1).Value) And ws.Cells(i, 1).Value <> \"\" Then\n            cellVal = CStr(ws.Cells(i, 1).Value)\n            parts = Split(cellVal, \",\")\n\n            For j = 0 To UBound(parts)\n                ws.Cells(i, j + 2).Value = Trim(parts(j))  ' B\u5217\u304b\u3089\u66f8\u304d\u8fbc\u307f\n            Next j\n        End If\n    Next i\n\n    MsgBox lastRow & \"\u884c\u306e\u51e6\u7406\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\"\nEnd Sub<\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Claude Code\u3078\u306e\u6307\u793a\u3067\u7279\u306b\u91cd\u8981\u306a\u306e\u306f\u300c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u300d\u3068\u300c\u51fa\u529b\u306e\u5f62\u5f0f\u300d\u3092\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3053\u3068\u3067\u3059\u3002\u300c\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6587\u5b57\u5217\u304cA\u5217\u306b\u3042\u308b\u2192B\u5217\u304b\u3089I\u5217\u306b\u5c55\u958b\u3059\u308b\u2192\u7a7a\u884c\u30b9\u30ad\u30c3\u30d7\u300d\u3068\u3044\u30463\u70b9\u3092\u660e\u78ba\u306b\u3059\u308b\u3060\u3051\u3067\u3001Null\u5bfe\u7b56\u30fbUBound\u30fbTrim\u304c\u5165\u3063\u305f\u5b8c\u6210\u5ea6\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u5206\u5272\u3057\u305f\u3044\u30c7\u30fc\u30bf\u3092\u6e96\u5099<\/strong><br><span style=\"font-size:12px;\">\u5165\u529b\u5f62\u5f0f\u30fb\u533a\u5207\u308a\u6587\u5b57\u3092\u78ba\u8a8d<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>Claude Code\u306b\u6307\u793a<\/strong><br><span style=\"font-size:12px;\">\u5165\u529b\/\u51fa\u529b\/\u30b9\u30ad\u30c3\u30d7\u6761\u4ef6<br>\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u751f\u6210\u30b3\u30fc\u30c9\u3092VBE\u306b\u8cbc\u308b<\/strong><br><span style=\"font-size:12px;\">Alt+F11\u3067VBE\u8d77\u52d5<br>\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u8cbc\u308a\u4ed8\u3051<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u5b9f\u884c\u30fb\u78ba\u8a8d<\/strong><br><span style=\"font-size:12px;\">F5\u307e\u305f\u306f\u30de\u30af\u30ed\u4e00\u89a7\u304b\u3089\u5b9f\u884c<\/span><\/div>\n<\/div>\n\n\n\n<div id=\"sec-09\"><\/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;\">09<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CONCLUSION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u307e\u3068\u3081\uff1aVBA Split\u95a2\u6570\u306e\u91cd\u8981\u30dd\u30a4\u30f3\u30c8<\/span>\n  <span class=\"section-desc\">\u57fa\u672c\u304b\u3089\u5b9f\u52d9\u30d1\u30bf\u30fc\u30f3\u307e\u3067\u306e\u78ba\u8a8d\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/span>\n<\/h2>\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>Split\u95a2\u6570\u306f<strong>Expression, Delimiter, Limit, Compare<\/strong>\u306e4\u5f15\u6570<\/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>\u8fd4\u308a\u5024\u306f<strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b90\u59cb\u307e\u308a\u306eString\u578b1\u6b21\u5143\u914d\u5217<\/strong><\/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>\u914d\u5217\u306e\u8981\u7d20\u6570\u306f<strong>UBound(arr) + 1<\/strong>\u3067\u53d6\u5f97<\/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>Limit\u5f15\u6570\u3067\u5206\u5272\u6570\u3092\u5236\u9650\uff08<strong>Limit=2\u30672\u5206\u5272<\/strong>\u306b\u4f7f\u3048\u308b\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>Compare\u5f15\u6570\u3067<strong>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225<\/strong>\u3092\u5236\u5fa1\uff08vbTextCompare=\u7121\u8996\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>\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u306f<strong>Replace\u95a2\u6570\u30671\u7a2e\u985e\u306b\u7d71\u4e00<\/strong>\u3057\u3066\u304b\u3089Split<\/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>CSV\u89e3\u6790\u306f<strong>\u6539\u884c\u2192\u884c\u5206\u5272\u2192\u30ab\u30f3\u30de\u2192\u5217\u5206\u5272<\/strong>\u306e2\u91cdSplit<\/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>\u30a8\u30e9\u30fc\u5bfe\u7b56\u306f<strong>IsNull\/\u7a7a\u30c1\u30a7\u30c3\u30af\u30fbUBound\u78ba\u8a8d<\/strong>\u306e2\u70b9\u304c\u91cd\u8981<\/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<\/strong>\u306b\u6307\u793a\u3092\u51fa\u305b\u3070Split+Null\u5bfe\u7b56\u8fbc\u307f\u306e\u30b3\u30fc\u30c9\u304c\u5373\u751f\u6210<\/span><\/div>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">VBA\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u3092AI\u3067\u52b9\u7387\u5316\u3057\u305f\u3044\u65b9\u3078<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Split\u95a2\u6570\u3092\u4f7f\u3063\u305fCSV\u89e3\u6790\u3084\u6587\u5b57\u5217\u51e6\u7406\u3092\u306f\u3058\u3081\u3001VBA\u306e\u7e70\u308a\u8fd4\u3057\u4f5c\u696d\u306fClaude Code\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u5927\u5e45\u306b\u52b9\u7387\u5316\u3067\u304d\u307e\u3059\u3002<br>AI\u9b3c\u7ba1\u7406\u3067\u306f\u3001ExcelVBA\u30fb\u696d\u52d9\u81ea\u52d5\u5316\u306eAI\u6d3b\u7528\u8a2d\u8a08\u30fb\u5b9f\u88c5\u652f\u63f4\u3092\u884c\u3063\u3066\u3044\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\">\u300c\u6bce\u6708\u540c\u3058CSV\u3092\u624b\u4f5c\u696d\u3067Excel\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u3044\u308b\u300d\u300cVBA\u304c\u66f8\u3051\u306a\u3044\u304c\u81ea\u52d5\u5316\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u76f8\u8ac7\u306f\u975e\u5e38\u306b\u591a\u3044\u3067\u3059\u3002\u307e\u305a\u306f\u7121\u6599\u76f8\u8ac7\u3067\u3069\u3093\u306a\u51e6\u7406\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u304b\u3092\u805e\u304b\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);border-radius:16px;padding:36px 32px;margin:48px 0 16px;color:#fff;\">\n  <p style=\"font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"font-size:22px;font-weight:800;line-height:1.5;margin:0 0 20px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u3001\u3042\u306a\u305f\u306e\u30d3\u30b8\u30cd\u30b9\u3067<br>\u5b9f\u8df5\u3057\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n  <div style=\"background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:12px;padding:24px;max-width:560px;margin:0 auto;\">\n    <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">AI\u6d3b\u7528\u3092\u81ea\u793e\u3067\u56de\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u65b9\u3078<\/p>\n    <p style=\"font-size:20px;font-weight:800;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n    <p style=\"font-size:14px;color:rgba(255,255,255,0.75);margin:0 0 20px;line-height:1.7;\">Claude Code\u30fbCowork\u5c0e\u5165\u652f\u63f4\u304b\u3089\u696d\u52d9\u8a2d\u8a08\u30fb\u793e\u5185\u6d78\u900f\u307e\u3067\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3002\u300c\u81ea\u793e\u3067\u56de\u305b\u308b\u7d44\u7e54\u300d\u309290\u65e5\u3067\u4f5c\u308b\u7d4c\u55b6\u8005\u5411\u3051\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3002<\/p>\n    <div style=\"text-align:center;\">\n      <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&utm_medium=article&utm_campaign=cc-vba-split-string&utm_content=next-step-cta\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;background:#dc2626;color:#fff;font-weight:700;font-size:15px;padding:14px 32px;border-radius:30px;text-decoration:none;\">AI\u9b3c\u7ba1\u7406\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u306eSplit\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Split(\u6587\u5b57\u5217, \u533a\u5207\u308a\u6587\u5b57)\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066String\u578b\u306e\u914d\u5217\u304c\u8fd4\u308a\u307e\u3059\u3002\u4f8b: items = Split(\"A,B,C\", \",\") \u3068\u3059\u308b\u3068 items(0)=\"A\", items(1)=\"B\", items(2)=\"C\" \u306b\u306a\u308a\u307e\u3059\u3002\u914d\u5217\u306e\u8981\u7d20\u6570\u306fUBound(items)+1\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002For i = 0 To UBound(items)\u3067\u30eb\u30fc\u30d7\u3057\u3066\u5168\u8981\u7d20\u3092\u51e6\u7406\u3059\u308b\u306e\u304c\u57fa\u672c\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Split\u95a2\u6570\u3067\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Split\u95a2\u6570\u306f\u533a\u5207\u308a\u6587\u5b57\u30921\u7a2e\u985e\u3057\u304b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u306b\u5bfe\u5fdc\u3059\u308b\u306b\u306f\u3001Replace\u95a2\u6570\u3067\u5168\u3066\u306e\u533a\u5207\u308a\u6587\u5b57\u30921\u7a2e\u985e\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089Split\u3057\u307e\u3059\u3002\u4f8b: str = Replace(str, \";\", \",\") \u2192 parts = Split(str, \",\") \u306e\u3088\u3046\u306b\u3001\u30bb\u30df\u30b3\u30ed\u30f3\u3092\u30ab\u30f3\u30de\u306b\u7f6e\u63db\u3057\u3066\u304b\u3089\u30ab\u30f3\u30de\u3067Split\u3057\u307e\u3059\u30023\u7a2e\u985e\u4ee5\u4e0a\u306e\u533a\u5207\u308a\u304c\u3042\u308b\u5834\u5408\u306f\u8907\u6570\u306eReplace\u3092\u9023\u7d9a\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Split\u95a2\u6570\u3067\u300c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6709\u52b9\u7bc4\u56f2\u306b\u3042\u308a\u307e\u305b\u3093\u300d\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002\u539f\u56e0\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u914d\u5217\u306e\u7bc4\u56f2\u5916\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u306e\u304c\u539f\u56e0\u3067\u3059\u3002\u4f8b\u3048\u3070Split\u30673\u8981\u7d20\u306e\u914d\u5217\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b90\u301c2\uff09\u306b\u5bfe\u3057\u3066items(3)\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3053\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u5bfe\u7b56: \u30a2\u30af\u30bb\u30b9\u524d\u306bIf targetIndex <= UBound(items) Then\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304cUBound\u4ee5\u4e0b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001Split\u304c\u8fd4\u3059\u914d\u5217\u306e\u8981\u7d20\u6570\u304c\u60f3\u5b9a\u3088\u308a\u5c11\u306a\u3044\u5834\u5408\u306f\u3001\u533a\u5207\u308a\u6587\u5b57\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\uff08\u305d\u306e\u5834\u5408\u306fitems(0)\u306b\u5143\u306e\u6587\u5b57\u5217\u5168\u4f53\u304c\u5165\u308a\u307e\u3059\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. VBA\u3067CSV\u30d5\u30a1\u30a4\u30eb\u3092Split\u3067\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Open\/Input\/Close\u3067\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u3093\u3060\u5f8c\u3001\u2460\u6539\u884c\u30b3\u30fc\u30c9\u3067\u884c\u306b\u5206\u5272\uff08Split(text, vbCrLf)\uff09\u2192\u2461\u5404\u884c\u3092\u30ab\u30f3\u30de\u3067\u5217\u306b\u5206\u5272\uff08Split(line, \",\")\uff09\u2192\u2462\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u3001\u3068\u3044\u30462\u91cdSplit\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3044\u307e\u3059\u3002Windows\u306e\u30d5\u30a1\u30a4\u30eb\u306fvbCrLf\uff08\\r\\n\uff09\u3068vbLf\uff08\\n\uff09\u304c\u6df7\u5728\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001Replace(text, vbCr, \"\")\u3067vbCr\u3092\u9664\u53bb\u3057\u3066\u304b\u3089vbLf\u3067Split\u3059\u308b\u306e\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Split\u95a2\u6570\u3067Null\u304c\u5165\u3063\u305f\u30bb\u30eb\u3092\u51e6\u7406\u3059\u308b\u3068\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u300d\u304c\u51fa\u307e\u3059\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Split\u95a2\u6570\u306bNull\u5024\u3092\u6e21\u3059\u3068\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff08\u30a8\u30e9\u30fc13\uff09\u300d\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u30bb\u30eb\u306e\u5024\u3092\u6e21\u3059\u524d\u306bIsNull()\u307e\u305f\u306fIsEmpty()\u3067Null\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3044\u3001Null\u306a\u3089Split\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u30bb\u30eb\u306e\u5024\u306fVariant\u578b\u3067\u53d6\u5f97\u3055\u308c\u308b\u305f\u3081\u3001Split\u95a2\u6570\u306b\u6e21\u3059\u524d\u306bCStr(cellValue)\u3067\u6587\u5b57\u5217\u578b\u306b\u5909\u63db\u3059\u308b\u7fd2\u6163\u3092\u3064\u3051\u308b\u3068\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Claude Code\u3067VBA\u306eSplit\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u3082\u3089\u3046\u306b\u306f\u3069\u3046\u6307\u793a\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u300c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\uff08\u3069\u306e\u5217\u30fb\u3069\u3093\u306a\u533a\u5207\u308a\u6587\u5b57\uff09\u300d\u300c\u51fa\u529b\u306e\u5f62\u5f0f\uff08\u3069\u306e\u5217\u306b\u5c55\u958b\u3059\u308b\u304b\uff09\u300d\u300c\u30b9\u30ad\u30c3\u30d7\u6761\u4ef6\uff08\u7a7a\u884c\u30fbNull\u306e\u6271\u3044\uff09\u300d\u306e3\u70b9\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u306e\u304c\u52b9\u679c\u7684\u3067\u3059\u3002\u4f8b: \u300cA\u5217\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6587\u5b57\u5217\u304c\u3042\u308a\u307e\u3059\u3002Split\u95a2\u6570\u3067\u5206\u5272\u3057\u3066B\u5217\u304b\u3089J\u5217\u306b\u5c55\u958b\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u3002\u7a7a\u30bb\u30eb\u306f\u30b9\u30ad\u30c3\u30d7\u3002\u5404\u8981\u7d20\u306fTrim\u3067\u7a7a\u767d\u9664\u53bb\u3002\u300d\u3053\u306e\u3088\u3046\u306b\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3068\u3001UBound\u30fbNull\u30c1\u30a7\u30c3\u30af\u30fbTrim\u304c\u5165\u3063\u305f\u5b8c\u6210\u5ea6\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u304c\u8fd4\u3063\u3066\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\u306eSplit\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Split(\u6587\u5b57\u5217, \u533a\u5207\u308a\u6587\u5b57)\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066String\u578b\u306e\u914d\u5217\u304c\u8fd4\u308a\u307e\u3059\u3002\u4f8b: items = Split(\\\"A,B,C\\\", \\\",\\\") \u3068\u3059\u308b\u3068 items(0)=\\\"A\\\", items(1)=\\\"B\\\", items(2)=\\\"C\\\" \u306b\u306a\u308a\u307e\u3059\u3002\u914d\u5217\u306e\u8981\u7d20\u6570\u306fUBound(items)+1\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002For i = 0 To UBound(items)\u3067\u30eb\u30fc\u30d7\u3057\u3066\u5168\u8981\u7d20\u3092\u51e6\u7406\u3059\u308b\u306e\u304c\u57fa\u672c\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Split\u95a2\u6570\u3067\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Split\u95a2\u6570\u306f\u533a\u5207\u308a\u6587\u5b57\u30921\u7a2e\u985e\u3057\u304b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u306b\u5bfe\u5fdc\u3059\u308b\u306b\u306f\u3001Replace\u95a2\u6570\u3067\u5168\u3066\u306e\u533a\u5207\u308a\u6587\u5b57\u30921\u7a2e\u985e\u306b\u7d71\u4e00\u3057\u3066\u304b\u3089Split\u3057\u307e\u3059\u3002\u4f8b: str = Replace(str, \\\";\\\", \\\",\\\") \u2192 parts = Split(str, \\\",\\\") \u306e\u3088\u3046\u306b\u3001\u30bb\u30df\u30b3\u30ed\u30f3\u3092\u30ab\u30f3\u30de\u306b\u7f6e\u63db\u3057\u3066\u304b\u3089\u30ab\u30f3\u30de\u3067Split\u3057\u307e\u3059\u30023\u7a2e\u985e\u4ee5\u4e0a\u306e\u533a\u5207\u308a\u304c\u3042\u308b\u5834\u5408\u306f\u8907\u6570\u306eReplace\u3092\u9023\u7d9a\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Split\u95a2\u6570\u3067\u300c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6709\u52b9\u7bc4\u56f2\u306b\u3042\u308a\u307e\u305b\u3093\u300d\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002\u539f\u56e0\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u914d\u5217\u306e\u7bc4\u56f2\u5916\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u306e\u304c\u539f\u56e0\u3067\u3059\u3002\u4f8b\u3048\u3070Split\u30673\u8981\u7d20\u306e\u914d\u5217\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b90\u301c2\uff09\u306b\u5bfe\u3057\u3066items(3)\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3053\u306e\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\u5bfe\u7b56: \u30a2\u30af\u30bb\u30b9\u524d\u306bIf targetIndex <= UBound(items) Then\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304cUBound\u4ee5\u4e0b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001Split\u304c\u8fd4\u3059\u914d\u5217\u306e\u8981\u7d20\u6570\u304c\u60f3\u5b9a\u3088\u308a\u5c11\u306a\u3044\u5834\u5408\u306f\u3001\u533a\u5207\u308a\u6587\u5b57\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\uff08\u305d\u306e\u5834\u5408\u306fitems(0)\u306b\u5143\u306e\u6587\u5b57\u5217\u5168\u4f53\u304c\u5165\u308a\u307e\u3059\uff09\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"VBA\u3067CSV\u30d5\u30a1\u30a4\u30eb\u3092Split\u3067\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Open\/Input\/Close\u3067\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u3093\u3060\u5f8c\u3001\u2460\u6539\u884c\u30b3\u30fc\u30c9\u3067\u884c\u306b\u5206\u5272\uff08Split(text, vbCrLf)\uff09\u2192\u2461\u5404\u884c\u3092\u30ab\u30f3\u30de\u3067\u5217\u306b\u5206\u5272\uff08Split(line, \\\",\\\")\uff09\u2192\u2462\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u3001\u3068\u3044\u30462\u91cdSplit\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3044\u307e\u3059\u3002Windows\u306e\u30d5\u30a1\u30a4\u30eb\u306fvbCrLf\uff08\\\\r\\\\n\uff09\u3068vbLf\uff08\\\\n\uff09\u304c\u6df7\u5728\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001Replace(text, vbCr, \\\"\\\")\u3067vbCr\u3092\u9664\u53bb\u3057\u3066\u304b\u3089vbLf\u3067Split\u3059\u308b\u306e\u304c\u5b89\u5168\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Split\u95a2\u6570\u3067Null\u304c\u5165\u3063\u305f\u30bb\u30eb\u3092\u51e6\u7406\u3059\u308b\u3068\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u300d\u304c\u51fa\u307e\u3059\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Split\u95a2\u6570\u306bNull\u5024\u3092\u6e21\u3059\u3068\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff08\u30a8\u30e9\u30fc13\uff09\u300d\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u30bb\u30eb\u306e\u5024\u3092\u6e21\u3059\u524d\u306bIsNull()\u307e\u305f\u306fIsEmpty()\u3067Null\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3044\u3001Null\u306a\u3089Split\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u30bb\u30eb\u306e\u5024\u306fVariant\u578b\u3067\u53d6\u5f97\u3055\u308c\u308b\u305f\u3081\u3001Split\u95a2\u6570\u306b\u6e21\u3059\u524d\u306bCStr(cellValue)\u3067\u6587\u5b57\u5217\u578b\u306b\u5909\u63db\u3059\u308b\u7fd2\u6163\u3092\u3064\u3051\u308b\u3068\u5b89\u5168\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Claude Code\u3067VBA\u306eSplit\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u3082\u3089\u3046\u306b\u306f\u3069\u3046\u6307\u793a\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u300c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\uff08\u3069\u306e\u5217\u30fb\u3069\u3093\u306a\u533a\u5207\u308a\u6587\u5b57\uff09\u300d\u300c\u51fa\u529b\u306e\u5f62\u5f0f\uff08\u3069\u306e\u5217\u306b\u5c55\u958b\u3059\u308b\u304b\uff09\u300d\u300c\u30b9\u30ad\u30c3\u30d7\u6761\u4ef6\uff08\u7a7a\u884c\u30fbNull\u306e\u6271\u3044\uff09\u300d\u306e3\u70b9\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u306e\u304c\u52b9\u679c\u7684\u3067\u3059\u3002\u4f8b: \u300cA\u5217\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6587\u5b57\u5217\u304c\u3042\u308a\u307e\u3059\u3002Split\u95a2\u6570\u3067\u5206\u5272\u3057\u3066B\u5217\u304b\u3089J\u5217\u306b\u5c55\u958b\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u3002\u7a7a\u30bb\u30eb\u306f\u30b9\u30ad\u30c3\u30d7\u3002\u5404\u8981\u7d20\u306fTrim\u3067\u7a7a\u767d\u9664\u53bb\u3002\u300d\u3053\u306e\u3088\u3046\u306b\u5177\u4f53\u7684\u306b\u4f1d\u3048\u308b\u3068\u3001UBound\u30fbNull\u30c1\u30a7\u30c3\u30af\u30fbTrim\u304c\u5165\u3063\u305f\u5b8c\u6210\u5ea6\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>VBA\u306eSplit\u95a2\u6570\u3092\u5b8c\u5168\u89e3\u8aac\u3002\u57fa\u672c\u69cb\u6587\u30fb\u533a\u5207\u308a\u6587\u5b57\u306e\u6307\u5b9a\u30fb\u53d6\u308a\u51fa\u3057\u56de\u6570\u306e\u5236\u9650\u30fb\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\u3001\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u5bfe\u5fdc\uff08Replace\u4f75\u7528\uff09\u3001UBound\u3067\u914d\u5217\u8981\u7d20\u6570\u3092\u53d6\u5f97\u30012\u6b21\u5143\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3001Claude Code\u3067\u306e\u81ea\u52d5\u30b3\u30fc\u30c9\u751f\u6210\u307e\u3067\u5b9f\u4f8b\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u7db2\u7f85\u3002<\/p>\n","protected":false},"author":1,"featured_media":18442,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"VBA\u306eSplit\u95a2\u6570\u3092\u5b8c\u5168\u89e3\u8aac\u3002\u57fa\u672c\u69cb\u6587\u30fb\u533a\u5207\u308a\u6587\u5b57\u306e\u6307\u5b9a\u30fb\u53d6\u308a\u51fa\u3057\u56de\u6570\u306e\u5236\u9650\u30fb\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u533a\u5225\u3001\u8907\u6570\u533a\u5207\u308a\u6587\u5b57\u5bfe\u5fdc\uff08Replace\u4f75\u7528\uff09\u3001UBound\u3067\u914d\u5217\u8981\u7d20\u6570\u3092\u53d6\u5f97\u30012\u6b21\u5143\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3001Claude Code\u3067\u306e\u81ea\u52d5\u30b3\u30fc\u30c9\u751f\u6210\u307e\u3067\u5b9f\u4f8b\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u7db2\u7f85\u3002","rank_math_focus_keyword":"VBA Split \u95a2\u6570 \u6587\u5b57\u5217 \u5206\u5272","rank_math_title":"\u30102026\u5e747\u6708\u6700\u65b0\u3011VBA Split\u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u8907\u6570\u533a\u5207\u308a\u30fb\u914d\u5217\u64cd\u4f5c\u30fbClaude Code\u6d3b\uff5cAI\u9b3c\u7ba1\u7406","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[3,2],"tags":[],"class_list":["post-18443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-automation","category-claude-tips"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18443","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=18443"}],"version-history":[{"count":1,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18443\/revisions"}],"predecessor-version":[{"id":18444,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18443\/revisions\/18444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/18442"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=18443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=18443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=18443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}