{"id":5186,"date":"2022-07-08T13:03:49","date_gmt":"2022-07-08T04:03:49","guid":{"rendered":"https:\/\/okamurax.com\/?p=5186"},"modified":"2022-07-08T13:03:49","modified_gmt":"2022-07-08T04:03:49","slug":"vba-instr-split-lbound-ubound","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=5186","title":{"rendered":"VBA InStr, Split, LBound, UBound"},"content":{"rendered":"<p>\u3044\u3064\u3082\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067<\/p>\n<pre class=\"lang:vb decode:true \">Sub test()\r\n\r\nSet w = ThisWorkbook.Sheets(\"\u30de\u30b9\u30bf\")\r\n\r\nr = 3\r\nDo While w.Cells(r, 1).Value &lt;&gt; \"\"\r\n\r\n  If InStr(w.Cells(r, 1).Value, \"\u3001\") &gt;= 1 Then ' \u542b\u307e\u308c\u3066\u3044\u305f\u3089\r\n  \r\n    tmp = Split(w.Cells(r, 1).Value, \"\u3001\") ' \u6587\u5b57\u5217\u3092\u8a18\u53f7\u3067\u5206\u5272\r\n    \r\n    For i = LBound(tmp) To UBound(tmp) ' \u914d\u5217\u306e\u30eb\u30fc\u30d7\r\n      rr = rr + 1\r\n    Next i\r\n      \r\n  Else\r\n    rr = rr + 1\r\n  End If\r\nr = r + 1\r\nLoop\r\n\r\nMsgBox rr\r\n\r\nEnd Sub<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3064\u3082\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067 Sub test() Set w = ThisWorkbook.Sheets(&#8220;\u30de\u30b9\u30bf&#8221;) r = 3 Do While w.Cells(r, 1).Value &lt;&gt; &#8220;&#8221; If In &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=5186\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VBA InStr, Split, LBound, UBound&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-5186","post","type-post","status-publish","format-standard","hentry","category-1","tag-vba"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5186"}],"version-history":[{"count":1,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5186\/revisions"}],"predecessor-version":[{"id":5187,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5186\/revisions\/5187"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}