{"id":9612,"date":"2022-09-25T00:50:45","date_gmt":"2022-09-24T15:50:45","guid":{"rendered":"https:\/\/extan.jp\/?p=9612"},"modified":"2022-09-25T00:56:00","modified_gmt":"2022-09-24T15:56:00","slug":"%e3%80%90excel-vba%e3%80%91for-each-next%e6%96%87%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%ef%bc%81%e9%85%8d%e5%88%97%e6%93%8d%e4%bd%9c%e3%82%84%e6%8a%9c%e3%81%91%e3%82%8b%e6%96%b9%e6%b3%95%e3%82%82","status":"publish","type":"post","link":"https:\/\/extan.jp\/?p=9612","title":{"rendered":"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01"},"content":{"rendered":"<p>VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001<\/p>\n<div class=\"kininarukoto1\">\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u304c\u65b9\u6cd5\u304c\u3088\u304f\u308f\u304b\u3089\u306a\u3044<br \/>\n\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u914d\u5217\u64cd\u4f5c\u3092\u3057\u305f\u3044\u304c\u304c\u601d\u3046\u3088\u3046\u306b\u53d6\u5f97\u3067\u304d\u305a\u56f0\u3063\u3066\u3044\u308b<\/div>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u304a\u60a9\u307f\u3092\u89e3\u6c7a\u3059\u308b<\/p>\n<div class=\"rdinfo\">\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5<br \/>\n\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\">\u3082\u304f\u3058<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%A7For_Each%E2%80%A6Next%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8\" title=\"VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u30a4\u30e1\u30fc\u30b8\">VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u30a4\u30e1\u30fc\u30b8<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%A7For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95\" title=\"VBA\u3067For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\">VBA\u3067For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extan.jp\/?p=9612\/#%E3%83%AB%E3%83%BC%E3%83%97%E3%81%A7%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E8%A1%A8%E3%82%92%E6%BA%96%E5%82%99%E3%81%99%E3%82%8B\" title=\"\u30eb\u30fc\u30d7\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u8868\u3092\u6e96\u5099\u3059\u308b\">\u30eb\u30fc\u30d7\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u8868\u3092\u6e96\u5099\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=9612\/#For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AE%E6%A7%8B%E6%96%87\" title=\"For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u69cb\u6587\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u69cb\u6587<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/extan.jp\/?p=9612\/#For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%BB%E3%83%AB%E3%82%92%E7%9B%B4%E6%8E%A5%E5%8F%82%E7%85%A7%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A0\" title=\"For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u30bb\u30eb\u3092\u76f4\u63a5\u53c2\u7167\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2460\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u30bb\u30eb\u3092\u76f4\u63a5\u53c2\u7167\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2460<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%B3%E3%83%BC%E3%83%89\" title=\"VBA\u30b3\u30fc\u30c9\">VBA\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E5%AE%9F%E8%A3%85\" title=\"VBA\u306e\u5b9f\u88c5\">VBA\u306e\u5b9f\u88c5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/extan.jp\/?p=9612\/#For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%A8Exit_For%E3%81%A7%E6%9D%A1%E4%BB%B6%E3%81%AB%E5%90%88%E8%87%B4%E3%81%97%E3%81%9F%E3%82%89%E5%87%A6%E7%90%86%E3%82%92%E6%8A%9C%E3%81%91%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A2\" title=\"For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068Exit For\u3067\u6761\u4ef6\u306b\u5408\u81f4\u3057\u305f\u3089\u51e6\u7406\u3092\u629c\u3051\u308b\u30d1\u30bf\u30fc\u30f3\u2462\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068Exit For\u3067\u6761\u4ef6\u306b\u5408\u81f4\u3057\u305f\u3089\u51e6\u7406\u3092\u629c\u3051\u308b\u30d1\u30bf\u30fc\u30f3\u2462<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%B3%E3%83%BC%E3%83%89-2\" title=\"VBA\u30b3\u30fc\u30c9\">VBA\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-2\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E-2\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/extan.jp\/?p=9612\/#For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E5%80%A4%E3%82%92%E4%BB%A3%E5%85%A5%E3%81%97%E3%81%9F%E9%85%8D%E5%88%97%E3%81%A7%E5%87%A6%E7%90%86%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A2\" title=\"For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u5024\u3092\u4ee3\u5165\u3057\u305f\u914d\u5217\u3067\u51e6\u7406\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2462\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u5024\u3092\u4ee3\u5165\u3057\u305f\u914d\u5217\u3067\u51e6\u7406\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2462<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%B3%E3%83%BC%E3%83%89-3\" title=\"VBA\u30b3\u30fc\u30c9\">VBA\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-3\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E-3\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/extan.jp\/?p=9612\/#For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%A7%E5%8F%96%E5%BE%97%E3%81%97%E3%81%9F%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%88%A5%E3%82%B7%E3%83%BC%E3%83%88%E3%81%B8%E8%BB%A2%E8%A8%98%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A3\" title=\"For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u53d6\u5f97\u3057\u305f\u30bb\u30eb\u306e\u5024\u3092\u5225\u30b7\u30fc\u30c8\u3078\u8ee2\u8a18\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2463\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u53d6\u5f97\u3057\u305f\u30bb\u30eb\u306e\u5024\u3092\u5225\u30b7\u30fc\u30c8\u3078\u8ee2\u8a18\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2463<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%B3%E3%83%BC%E3%83%89-4\" title=\"VBA\u30b3\u30fc\u30c9\">VBA\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B\" title=\"VBA\u3092\u8a2d\u5b9a\u3059\u308b\">VBA\u3092\u8a2d\u5b9a\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-4\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E-4\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/extan.jp\/?p=9612\/#%E5%88%A5%E3%82%B7%E3%83%BC%E3%83%88%E3%81%AE%E5%87%BA%E5%8A%9B%E4%BD%8D%E7%BD%AE%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B\" title=\"\u5225\u30b7\u30fc\u30c8\u306e\u51fa\u529b\u4f4d\u7f6e\u3092\u5909\u66f4\u3059\u308b\">\u5225\u30b7\u30fc\u30c8\u306e\u51fa\u529b\u4f4d\u7f6e\u3092\u5909\u66f4\u3059\u308b<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\" title=\"VBA\u306e\u5b9f\u88c5\u624b\u9806\">VBA\u306e\u5b9f\u88c5\u624b\u9806<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/extan.jp\/?p=9612\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-5\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/extan.jp\/?p=9612\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" title=\"\u3055\u3044\u3054\u306b\">\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%A7For_Each%E2%80%A6Next%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8\"><\/span>VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u30a4\u30e1\u30fc\u30b8<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>Excel\u5074\u306b\u8868\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>VBA\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Excel\u8868\u306e\u30eb\u30fc\u30d7\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9621\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_2.png\" alt=\"\" width=\"137\" height=\"126\" \/><\/p>\n<p>\u307e\u305f\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u306b\u6761\u4ef6\u3092\u4ed8\u3051\u3066\u9014\u4e2d\u3067\u629c\u3051\u305f\u308a\u3001<br \/>\n\u5225\u30b7\u30fc\u30c8\u3078\u30bb\u30eb\u306e\u5024\u3092\u8ee2\u8a18\u3057\u305f\u308a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9660\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2.png\" alt=\"\" width=\"241\" height=\"240\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2.png 241w, https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2-150x150.png 150w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/p>\n<p>\u305d\u308c\u3067\u306f\u65e9\u901f\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%A7For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95\"><\/span>VBA\u3067For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>VBA\u3067For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%AB%E3%83%BC%E3%83%97%E3%81%A7%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E8%A1%A8%E3%82%92%E6%BA%96%E5%82%99%E3%81%99%E3%82%8B\"><\/span>\u30eb\u30fc\u30d7\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u8868\u3092\u6e96\u5099\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Excel\u5074\u306b&#8221;Sheet1&#8243;\u30b7\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u5bfe\u8c61\u3068\u306a\u308b\u8868\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>\u30eb\u30fc\u30d7\u3067\u30bb\u30eb\u306e\u6700\u7d42\u884c\u3092\u53d6\u5f97\u3059\u308b\u5bfe\u8c61\u306e\u5217\u306fA\u5217\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AE%E6%A7%8B%E6%96%87\"><\/span>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u69cb\u6587<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"info\"><code>For Each element In group<br \/>\n[statements]\n[Exit For]\n[statements]\nNext [element]<\/code><\/div>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u69cb\u6587\u306e\u6307\u5b9a\u9805\u76ee\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<th>\u30d1\u30fc\u30c4<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>element<\/td>\n<td>\u5fc5\u9808\u3002 \u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u307e\u305f\u306f\u914d\u5217\u306e\u8981\u7d20\u3092\u53cd\u5fa9\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b?\u5909\u6570\u3067\u3059\u3002 \u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u5834\u5408\u3001?\u8981\u7d20?\u306b\u306f?Variant?\u5909\u6570\u3001\u6c4e\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u3001\u307e\u305f\u306f\u7279\u5b9a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u306e\u307f\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002 \u914d\u5217\u306e\u5834\u5408\u306f\u3001element?\u306b\u4f7f\u7528\u3067\u304d\u308b\u306e\u306f?Variant?\u5909\u6570\u3060\u3051\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>group<\/td>\n<td>\u5fc5\u9808\u3002 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u307e\u305f\u306f\u914d\u5217\u306e\u540d\u524d\u3067\u3059 (\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u578b\u306e\u914d\u5217\u3092\u9664\u304d\u307e\u3059)\u3002<\/td>\n<\/tr>\n<tr>\n<td>statements<\/td>\n<td>\u7701\u7565\u53ef\u80fd\u3002?group?\u306e\u5404\u30a2\u30a4\u30c6\u30e0\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3055\u308c\u308b 1 \u3064\u4ee5\u4e0a\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>Exit For<\/td>\n<td>For \u30eb\u30fc\u30d7\u3092\u629c\u3051\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53c2\u8003\uff1ahttps:\/\/learn.microsoft.com\/ja-jp\/office\/vba\/language\/reference\/user-interface-help\/for-eachnext-statement<\/p>\n<h3><span class=\"ez-toc-section\" id=\"For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%82%BB%E3%83%AB%E3%82%92%E7%9B%B4%E6%8E%A5%E5%8F%82%E7%85%A7%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A0\"><\/span>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u30bb\u30eb\u3092\u76f4\u63a5\u53c2\u7167\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2460<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%B3%E3%83%BC%E3%83%89\"><\/span>VBA\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u30bb\u30eb\u3092\u76f4\u63a5\u53c2\u7167\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u306eVBA\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub ForEach\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u2460()\n    Dim intLastRowNum As Integer\n    Dim rngTemp As Range\n    \n    &#039;&quot;Sheet1&quot;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\n    With Sheets(&quot;Sheet1&quot;)\n        &#039;\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n        intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row\n        \n        For Each rngTemp In .Range(.Cells(2, 1), .Cells(intLastRowNum, 3))\n            Debug.Print rngTemp.Cells(1, 1)\n        Next\n    End With\n\nEnd Sub<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E5%AE%9F%E8%A3%85\"><\/span>VBA\u306e\u5b9f\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u306e\u5b9f\u88c5\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f<br \/>\nVBA\u306e\u5b9f\u88c5\u624b\u9806<br \/>\n\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30bb\u30eb\u306e\u5024\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u306d\uff01<\/p>\n<div class=\"info\"><code> 1<br \/>\nA<br \/>\n100<br \/>\n2<br \/>\nB<br \/>\n110<br \/>\n3<br \/>\nC<br \/>\n120<br \/>\n4<br \/>\nD<br \/>\n130<br \/>\n5<br \/>\nE<br \/>\n140<br \/>\n6<br \/>\nF<br \/>\n150<br \/>\n7<br \/>\nG<br \/>\n160 <\/code><\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u30bb\u30eb\u7bc4\u56f2\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u306f\u5168\u5217\u3092\u51fa\u529b\u3057\u305f\u5f8c\u6b21\u306e\u884c\u306b\u884c\u304f\u9806\u5e8f\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>&#8220;Sheet1&#8243;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>With Sheets(&quot;Sheet1&quot;)<\/code><\/div>\n<p>\u5bfe\u8c61\u306e\u8868\u306eA\u5217\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row<\/code><\/div>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u30672\u884c\u76ee\u304b\u3089\u6700\u7d42\u884c\u76ee\u307e\u3067\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u304a\u3053\u306a\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>For Each rngTemp In .Range(.Cells(2, 1), .Cells(intLastRowNum, 3))<\/code><\/div>\n<p>rngTemp\u306eCells\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eValue\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u5024\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>Debug.Print rngTemp.Cells(1, 1)<\/code><\/div>\n<h3><span class=\"ez-toc-section\" id=\"For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%A8Exit_For%E3%81%A7%E6%9D%A1%E4%BB%B6%E3%81%AB%E5%90%88%E8%87%B4%E3%81%97%E3%81%9F%E3%82%89%E5%87%A6%E7%90%86%E3%82%92%E6%8A%9C%E3%81%91%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A2\"><\/span>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068Exit For\u3067\u6761\u4ef6\u306b\u5408\u81f4\u3057\u305f\u3089\u51e6\u7406\u3092\u629c\u3051\u308b\u30d1\u30bf\u30fc\u30f3\u2462<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%B3%E3%83%BC%E3%83%89-2\"><\/span>VBA\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068Exit For\u3067\u6761\u4ef6\u306b\u5408\u81f4\u3057\u305f\u3089\u51e6\u7406\u3092\u629c\u3051\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30b5\u30f3\u30d7\u30eb\u3067\u306f5\u884c\u76ee\u306b\u306a\u3063\u305f\u3089\u51e6\u7406\u3092\u629c\u3051\u308b\u5185\u5bb9\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u306eVBA\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub ForEach\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u2461()\n    Dim intLastRowNum As Integer\n    Dim rngTemp As Range\n    \n    &#039;&quot;Sheet1&quot;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\n    With Sheets(&quot;Sheet1&quot;)\n        &#039;\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n        intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row\n\n        For Each rngTemp In .Range(.Cells(2, 1), .Cells(intLastRowNum, 3))\n            \n            If rngTemp.Cells(1, 1) = 4 Then\n                Exit For\n            End If\n\n            Debug.Print rngTemp.Cells(1, 1).Value\n            \n        Next\n        \n    End With\n\nEnd Sub<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-2\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>5\u3088\u308a\u524d\u306e\u5024\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u306d\uff01<\/p>\n<div class=\"info\"><code> 1<br \/>\nA<br \/>\n100<br \/>\n2<br \/>\nB<br \/>\n110<br \/>\n3<br \/>\nC<br \/>\n120<br \/>\n4<br \/>\nD<br \/>\n130 <\/code><\/div>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E-2\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>IF\u3067\u5909\u6570\u306e\u5024\u304c5\u3067\u3042\u308c\u3070Exit For\u3067\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u629c\u3051\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>            If rngTemp.Cells(1, 1) = 5 Then<br \/>\nExit For<br \/>\nEnd If<\/code><\/div>\n<h3><span class=\"ez-toc-section\" id=\"For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E5%80%A4%E3%82%92%E4%BB%A3%E5%85%A5%E3%81%97%E3%81%9F%E9%85%8D%E5%88%97%E3%81%A7%E5%87%A6%E7%90%86%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A2\"><\/span>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u5024\u3092\u4ee3\u5165\u3057\u305f\u914d\u5217\u3067\u51e6\u7406\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2462<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%B3%E3%83%BC%E3%83%89-3\"><\/span>VBA\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8+\u5024\u3092\u4ee3\u5165\u3057\u305f\u914d\u5217\u3067\u51e6\u7406\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u306eVBA\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub ForEach\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u2462()\n    Dim intLastRowNum As Integer\n    Dim arrTemp As Variant\n    Dim varTemp As Variant\n\n    \n    &#039;&quot;Sheet1&quot;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\n    With Sheets(&quot;Sheet1&quot;)\n        &#039;\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n        intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row\n        \n        &#039;\u30bb\u30eb\u7bc4\u56f2\u3092\u4e8c\u6b21\u5143\u914d\u5217\u3068\u3057\u3066\u914d\u5217\u306b\u4ee3\u5165\u3057\u307e\u3059\u3002\n        arrTemp = .Range(.Cells(2, 1), .Cells(intLastRowNum, 3))\n\n        For Each varTemp In arrTemp\n            Debug.Print varTemp\n        Next\n\n    End With\n\nEnd Sub<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-3\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30bb\u30eb\u306e\u5024\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u306d\uff01<\/p>\n<div class=\"info\"><code> 1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\nA<br \/>\nB<br \/>\nC<br \/>\nD<br \/>\nE<br \/>\nF<br \/>\nG<br \/>\n100<br \/>\n110<br \/>\n120<br \/>\n130<br \/>\n140<br \/>\n150<br \/>\n160 <\/code><\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u306f\uff11\u5217\u76ee\u306e\u884c\u3092\u3059\u3079\u3066\u51fa\u529b\u3057\u305f\u5f8c\u6b21\u306e\u5217\u306b\u884c\u304f\u9806\u5e8f\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E-3\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>&#8220;Sheet1&#8243;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>With Sheets(&quot;Sheet1&quot;)<\/code><\/div>\n<p>\u5bfe\u8c61\u306e\u8868\u306eA\u5217\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row<\/code><\/div>\n<p>\u30bb\u30eb\u7bc4\u56f2\u3092\u4e8c\u6b21\u5143\u914d\u5217\u3068\u3057\u3066\u914d\u5217\u306b\u4ee3\u5165\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>arrTemp = .Range(.Cells(2, 1), .Cells(intLastRowNum, 3))<\/code><\/div>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217arrTemp\u3092\uff11\u8981\u7d20\u3065\u3064\u53d6\u5f97\u3057\u3001\u5909\u6570varTemp\u306b\u4ee3\u5165\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n\u914d\u5217arrTemp\u306f\u4e8c\u6b21\u5143\u914d\u5217\u3068\u306a\u3063\u3066\u304a\u308a\u3001\u305d\u306e\u5834\u5408\u306f\uff11\u5217\u76ee\u304b\u3089\u51e6\u7406\u304c\u958b\u59cb\u3055\u308c\u3001\uff12\u5217\u3001\u6700\u7d42\u5217\u3068\u305d\u308c\u305e\u308c\u914d\u5217\u8981\u7d20\u6570\u5206\u51e6\u7406\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"info\">For Each varTemp In arrTemp<br \/>\nNext<\/div>\n<p>\u5909\u6570\u306e\u5024\u3092\u51fa\u529b\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>Debug.Print varTemp<\/code><\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u5909\u6570\u306b\u69d8\u3005\u306a\u5f62\u5f0f\u306e\u5024\u304c\u5165\u308b\u305f\u3081\u3001\u5f62\u5f0f\u306fVariant\u578b\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h3><span class=\"ez-toc-section\" id=\"For_Each%E2%80%A6Next_%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%A7%E5%8F%96%E5%BE%97%E3%81%97%E3%81%9F%E3%82%BB%E3%83%AB%E3%81%AE%E5%80%A4%E3%82%92%E5%88%A5%E3%82%B7%E3%83%BC%E3%83%88%E3%81%B8%E8%BB%A2%E8%A8%98%E3%81%99%E3%82%8B%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E2%91%A3\"><\/span>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u53d6\u5f97\u3057\u305f\u30bb\u30eb\u306e\u5024\u3092\u5225\u30b7\u30fc\u30c8\u3078\u8ee2\u8a18\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u2463<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u53d6\u5f97\u3057\u305f\u30bb\u30eb\u306e\u5024\u3092\u5225\u30b7\u30fc\u30c8\u3078\u8ee2\u8a18\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u300cSheet2\u300d\u30b7\u30fc\u30c8\u3092\u7528\u610f\u3057\u3001\u540c\u3058\u30bb\u30eb\u7bc4\u56f2\u3078\u300cSheet1\u300d\u30b7\u30fc\u30c8\u306e\u5024\u3092\u8ee2\u8a18\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9648\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092322_1646_2.png\" alt=\"\" width=\"200\" height=\"231\" \/><\/p>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%B3%E3%83%BC%E3%83%89-4\"><\/span>VBA\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u30b5\u30f3\u30d7\u30eb\u306eVBA\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub ForEach\u3067\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u2463()\n    Dim intLastRowNum As Integer\n    Dim rngTemp As Range\n    Dim intColumn As Integer\n    Dim i As Integer\n    Dim j As Integer\n    Dim k As Integer\n    \n    &#039;\u53d6\u5f97\u3057\u305f\u3044\u5217\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002C\u5217\u307e\u3067\u3067\u3042\u308c\u30703\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\n    intColumn = 4\n    &#039;\u958b\u59cb\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\n    i = 2\n    &#039;\u958b\u59cb\u5217\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u901a\u5e38\u306f1\u306b\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002B\u5217\u958b\u59cb\u306b\u3059\u308b\u3068\u304d\u306f2\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n    j = 1\n    k = j\n\n    &#039;&quot;Sheet1&quot;\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\n    With Sheets(&quot;Sheet1&quot;)\n        &#039;\u6700\u7d42\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n        intLastRowNum = .Cells(Rows.Count, 1).End(xlUp).Row\n\n        For Each rngTemp In .Range(.Cells(2, 1), .Cells(intLastRowNum, intColumn))\n            \n            Sheets(&quot;Sheet2&quot;).Cells(i, k) = rngTemp.Cells(1, 1).Value\n            \n            If k = intColumn + j - 1 Then\n                i = i + 1\n                k = j\n            Else\n                k = k + 1\n            End If\n        Next\n        \n    End With\n\nEnd Sub<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B\"><\/span>VBA\u3092\u8a2d\u5b9a\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u53d6\u5f97\u3057\u305f\u3044\u5217\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002C\u5217\u307e\u3067\u3067\u3042\u308c\u30703\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>intColumn = 3<\/code><\/div>\n<p>\u958b\u59cb\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>i = 2<\/code><\/div>\n<p>\u958b\u59cb\u5217\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u901a\u5e38\u306f1\u306b\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002B\u5217\u958b\u59cb\u306b\u3059\u308b\u3068\u304d\u306f2\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"info\"><code>j = 1 k = j<\/code><\/div>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-4\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9620\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092222_1351_1.png\" alt=\"\" width=\"225\" height=\"214\" \/><\/p>\n<p>\u300cSheet2\u300d\u30b7\u30fc\u30c8\u3078\u300cSheet1\u300d\u30b7\u30fc\u30c8\u306e\u5024\u304c\u8ee2\u8a18\u3055\u308c\u3066\u3044\u307e\u3059\u306d\uff01<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9659\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_1.png\" alt=\"\" width=\"202\" height=\"238\" \/><\/p>\n<h4><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E-4\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VBA\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>Sheets(&#8220;Sheet2&#8221;)\u306eCells\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u300cSheet1\u300d\u30b7\u30fc\u30c8\u306e\u30bb\u30eb\u306e\u5024\u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\">\n<p><code>        For Each rngTemp In .Range(.Cells(2, 1), .Cells(intLastRowNum, intColumn))<\/code><\/p>\n<p>Sheets(&#8220;Sheet2&#8221;).Cells(i, k) = rngTemp.Cells(1, 1).Value<\/p>\n<\/div>\n<p>For Each&#8230;Next \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u884c\/\u5217\u307e\u3068\u3081\u3066\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u7279\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u6539\u884c\u3057\u305f\u3044\u6761\u4ef6\u3092IF\u3067\u6307\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\nIF\u306e\u6761\u4ef6\u306e\u5185\u5bb9\u306f\u6700\u7d42\u5217\u306b\u306a\u3063\u305f\u3089\u958b\u59cb\u5217\u306b\u623b\u3059\u5185\u5bb9\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>            If k = intColumn + j - 1 Then<br \/>\ni = i + 1<br \/>\nk = j<br \/>\nElse<br \/>\nk = k + 1<br \/>\nEnd If<\/code><\/div>\n<h4><span class=\"ez-toc-section\" id=\"%E5%88%A5%E3%82%B7%E3%83%BC%E3%83%88%E3%81%AE%E5%87%BA%E5%8A%9B%E4%BD%8D%E7%BD%AE%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B\"><\/span>\u5225\u30b7\u30fc\u30c8\u306e\u51fa\u529b\u4f4d\u7f6e\u3092\u5909\u66f4\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5225\u30b7\u30fc\u30c8\u306e\u51fa\u529b\u4f4d\u7f6e\u3092A\u5217\u306f\u3058\u307e\u308a\u304b\u3089B\u5217\u306f\u3058\u307e\u308a\u3078\u3001\u307e\u305f\uff12\u884c\u76ee\u958b\u59cb\u304b\u3089\uff13\u884c\u540d\u958b\u59cb\u306b\u5909\u66f4\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u958b\u59cb\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>i = 3<\/code><\/div>\n<p>\u958b\u59cb\u5217\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002B\u5217\u958b\u59cb\u306e2\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>j = 2<\/code><\/div>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306f\u3044\u3001\u6307\u5b9a\u306e\u4f4d\u7f6e\u3078\u51fa\u529b\u3055\u308c\u307e\u3057\u305f\u306d\uff01<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9660\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2.png\" alt=\"\" width=\"241\" height=\"240\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2.png 241w, https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/092422_1543_2-150x150.png 150w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\"><\/span>VBA\u306e\u5b9f\u88c5\u624b\u9806<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5b9f\u88c5\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>Excel\u5074\u306bVBA\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u2460Excel\u3092\u65b0\u898f\u306b\u958b\u304d\u3001\u300c\u958b\u767a\u300d\u30bf\u30d6\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300cVisualBasic\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br \/>\n\u3082\u3057\u304f\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u300cAlt\u300d\uff0b\u300cF11\u300d\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<p>\u2461\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u5de6\u30da\u30a4\u30f3\u306eVBAProject\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u633f\u5165\u300d\u3001\u300c\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<img decoding=\"async\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/05\/050919_1542_VBAFunctio2.png\" alt=\"\" \/>\n<p>\u2462\u53f3\u30da\u30a4\u30f3\u306e\u30a6\u30a4\u30f3\u30c9\u30a6\u306b\u4e0a\u8a18\u306eVBA\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1680\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/09\/092219_1211_temp22.png\" alt=\"\" width=\"1395\" height=\"879\" \/><\/p>\n<p>\u3053\u3061\u3089\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-5\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3067\u306f\u65e9\u901fVBA\u306e\u5b9f\u884c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u2460\u300c\u958b\u767a\u300d\u30bf\u30d6\u306e\u300cVBA\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u5b9f\u884c\u3057\u305f\u3044\u30de\u30af\u30ed\u3092\u9078\u629e\u3057\u3001\u300c<strong>\u5b9f\u884c<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u2461\u51e6\u7406\u304c\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\"><\/span>\u3055\u3044\u3054\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<\/p>\n<div class=\"endinfo\">\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5<br \/>\n\u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ed6\u306b\u3082\u4fbf\u5229\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u3051\u308c\u3070\u3054\u53c2\u7167\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001 \u30fbVBA\u3067For Each&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[191],"class_list":{"0":"post-9612","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-excelvba","8":"tag-191","9":"article cf"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=9612\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"og:description\" content=\"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=9612\" \/>\n<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-24T15:50:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-24T15:56:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png\" \/>\n\t<meta property=\"og:image:width\" content=\"689\" \/>\n\t<meta property=\"og:image:height\" content=\"487\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"18\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/extan.jp\/#website\",\"url\":\"https:\/\/extan.jp\/\",\"name\":\"\u30a8\u30af\u77ed\uff5cExtan.jp\",\"description\":\"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/extan.jp\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/?p=9612#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png\",\"contentUrl\":\"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png\",\"width\":689,\"height\":487,\"caption\":\"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/extan.jp\/?p=9612#webpage\",\"url\":\"https:\/\/extan.jp\/?p=9612\",\"name\":\"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\",\"isPartOf\":{\"@id\":\"https:\/\/extan.jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/extan.jp\/?p=9612#primaryimage\"},\"datePublished\":\"2022-09-24T15:50:45+00:00\",\"dateModified\":\"2022-09-24T15:56:00+00:00\",\"author\":{\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\"},\"description\":\"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/extan.jp\/?p=9612#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/extan.jp\/?p=9612\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/extan.jp\/?p=9612#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/extan.jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\",\"name\":\"\u30bf\u30ab\u30d2\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/#personlogo\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"caption\":\"\u30bf\u30ab\u30d2\u30ed@extan\"},\"url\":\"https:\/\/extan.jp\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"description":"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/extan.jp\/?p=9612","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","og_description":"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","og_url":"https:\/\/extan.jp\/?p=9612","og_site_name":"\u30a8\u30af\u77ed\uff5cExtan.jp","article_published_time":"2022-09-24T15:50:45+00:00","article_modified_time":"2022-09-24T15:56:00+00:00","og_image":[{"width":689,"height":487,"url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30bf\u30ab\u30d2\u30ed@extan","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"18\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/extan.jp\/#website","url":"https:\/\/extan.jp\/","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/extan.jp\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=9612#primaryimage","inLanguage":"ja","url":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png","contentUrl":"https:\/\/extan.jp\/wp-content\/uploads\/2022\/09\/str-133.png","width":689,"height":487,"caption":"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01"},{"@type":"WebPage","@id":"https:\/\/extan.jp\/?p=9612#webpage","url":"https:\/\/extan.jp\/?p=9612","name":"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=9612#primaryimage"},"datePublished":"2022-09-24T15:50:45+00:00","dateModified":"2022-09-24T15:56:00+00:00","author":{"@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a"},"description":"\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3044\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u9014\u4e2d\u3067\u629c\u3051\u308b\u65b9\u6cd5\u30fbVBA\u3067For Each...Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u64cd\u4f5c\u3092\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/extan.jp\/?p=9612#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/extan.jp\/?p=9612"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=9612#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp\/"},{"@type":"ListItem","position":2,"name":"\u3010Excel VBA\u3011For Each Next\u6587\u306e\u4f7f\u3044\u65b9\uff01\u914d\u5217\u64cd\u4f5c\u3084\u629c\u3051\u308b\u65b9\u6cd5\u3082\uff01"}]},{"@type":"Person","@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/#personlogo","inLanguage":"ja","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","caption":"\u30bf\u30ab\u30d2\u30ed@extan"},"url":"https:\/\/extan.jp\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/9612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9612"}],"version-history":[{"count":7,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/9612\/revisions"}],"predecessor-version":[{"id":9668,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/9612\/revisions\/9668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/media\/9656"}],"wp:attachment":[{"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}