
{"id":8128,"date":"2024-11-22T15:03:05","date_gmt":"2024-11-22T06:03:05","guid":{"rendered":"https:\/\/techmania.jp\/blog\/?p=8128"},"modified":"2026-03-19T20:35:41","modified_gmt":"2026-03-19T11:35:41","slug":"excel-vba-array","status":"publish","type":"post","link":"https:\/\/techmania.jp\/blog\/excel-vba-array\/","title":{"rendered":"\u3010VBA\u5165\u9580\u3011\u914d\u5217\u307e\u3068\u3081\uff08\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u3001\u30eb\u30fc\u30d7\u64cd\u4f5c\u3001\u30b3\u30d4\u30fc\u3001\u7d50\u5408\uff09"},"content":{"rendered":"\n<p>\u914d\u5217\uff08Array\uff09\u306f\u3001\u540c\u3058\u578b\u306e\u5024\u3092\u9023\u756a\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff09\u3067\u4e26\u3079\u3066\u683c\u7d0d\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002VBA\u3067\u306f\u4e00\u6b21\u5143\uff08\u30ea\u30b9\u30c8\uff09\u3084\u4e8c\u6b21\u5143\uff08\u8868\uff09\u3068\u3057\u3066\u6271\u3044\u3001\u6dfb\u5b57\u3067\u500b\u3005\u306e\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u3053\u3046\u3057\u305f\u6027\u8cea\u304b\u3089\u3001\u540c\u3058\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u5927\u91cf\u306b\u6271\u3046\u5834\u9762\u3067\u914d\u5217\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Excel\u3067\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u3066\u9806\u756a\u306b\u51e6\u7406\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c7\u30fc\u30bf\u3092VBA\u3067\u914d\u5217\u306b\u683c\u7d0d\u3057\u3066\u304b\u3089\u51e6\u7406\u3092\u8d70\u3089\u305b\u308b\u3053\u3068\u3067\u3001\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u7c21\u6f54\u306b\u51e6\u7406\u304c\u5b9f\u884c\u3067\u304d\u305f\u308a\u3001\u4f7f\u7528\u3059\u308b\u30e1\u30e2\u30ea\u304c\u6e1b\u3089\u305b\u305f\u308a\u3059\u308b\u305f\u3081\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>VBA\u3067\u540c\u3058\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u5927\u91cf\u306b\u6271\u3046\u6642\u3001\u914d\u5217\u3092\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u5834\u9762\u306f\u6570\u591a\u304f\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u65b9\u3067\u3001\u6271\u3046\u8981\u7d20\u306e\u6570\u304c\u5897\u3048\u308b\u3053\u3068\u3067\u3001\u6587\u5b57\u5217\u578b\u3084\u6574\u6570\u578b\u306a\u3069\u306e\u5909\u6570\u306b\u6bd4\u3079\u3066\u3001\u5b9f\u969b\u306e\u51e6\u7406\u3067\u306e\u914d\u5217\u306e\u4f7f\u3044\u65b9\u306f\u8907\u96d1\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u4eca\u56de\u306f\u3001VBA\u306b\u304a\u3051\u308b\u914d\u5217\u306e\u57fa\u790e\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5fdc\u7528\u7684\u306a\u65b9\u6cd5\u307e\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3001\u914d\u5217\u306b\u3064\u3044\u3066\u307e\u3060\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u2026\u2026\u3068\u3044\u3046\u65b9\u306f\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\">\u914d\u5217\u3092\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u30fb\u518d\u5b9a\u7fa9\u3059\u308b<\/h2>\n\n\n\n<br>\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/images\/techmania\/thumbnail\/images\/vba_array.webp\" class=\"post-img\" alt=\"\u9759\u7684\u914d\u5217 \u52d5\u7684\u914d\u5217\" loading=\"lazy\">\n<br>\n\n\n\n<p>VBA\u3067\u306f\u3001\u914d\u5217\u306b\u306f\u5927\u304d\u304f\u5206\u3051\u30662\u3064\u306e\u5f62\u5f0f\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u3046\u3061\u3001\u3042\u3089\u304b\u3058\u3081\u8981\u7d20\u6570\u3084\u6b21\u5143\u6570\u304c\u6c7a\u3081\u3089\u308c\u3066\u3044\u3066\u3001\u3042\u3068\u304b\u3089\u5909\u66f4\u3067\u304d\u306a\u3044\u3082\u306e\u3092<strong>\u9759\u7684\uff08\u56fa\u5b9a\u9577\uff09\u914d\u5217<\/strong>\u3001\u914d\u5217\u3092\u5ba3\u8a00\u3057\u305f\u3042\u3068\u3067\u6570\u306e\u5897\u6e1b\u304c\u53ef\u80fd\u306a\u3082\u306e\u3092<strong>\u52d5\u7684\uff08\u53ef\u5909\u9577\uff09\u914d\u5217<\/strong>\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u3053\u304b\u3089\u5148\u3067\u306f\u3001\u9759\u7684\u914d\u5217\u3068\u52d5\u7684\u914d\u5217\u305d\u308c\u305e\u308c\u306b\u3064\u3044\u3066\u3001\u5ba3\u8a00\u30fb\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u3084\u914d\u5217\u306e\u8981\u7d20\u3092\u521d\u671f\u5316\u3059\u308b\u65b9\u6cd5\u3001\u4e00\u5ea6\u5b9a\u7fa9\u3057\u305f\u914d\u5217\u3092\u518d\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u306a\u3069\u3092\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__1_1\" class=\"wp-block-heading\">\u914d\u5217\u306e\u4f7f\u7528\u7528\u9014<\/h3>\n\n\n\n<p>VBA\u306b\u304a\u3051\u308b\u914d\u5217\u306f\u3001\u540c\u3058\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u3066\u6271\u3046\u5834\u9762\u3067\u591a\u304f\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u7279\u306bExcel\u3067\u306f\u3001\u8907\u6570\u306e\u30bb\u30eb\u306b\u5bfe\u3057\u3066\u540c\u3058\u51e6\u7406\u3092\u7e70\u308a\u8fd4\u3059\u30b1\u30fc\u30b9\u304c\u591a\u304f\u3001\u914d\u5217\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u52b9\u7387\u7684\u306b\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u5927\u91cf\u306e\u884c\u30c7\u30fc\u30bf\u30921\u30bb\u30eb\u305a\u3064\u8aad\u307f\u66f8\u304d\u3059\u308b\u3068\u3001\u305d\u306e\u90fd\u5ea6Excel\u3068\u306e\u901a\u4fe1\u51e6\u7406\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u91cf\u304c\u5897\u3048\u51e6\u7406\u901f\u5ea6\u304c\u4f4e\u4e0b\u3057\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30bb\u30eb\u7bc4\u56f2\u3092\u4e00\u5ea6\u914d\u5217\u3078\u683c\u7d0d\u3057\u3001\u914d\u5217\u4e0a\u3067\u8a08\u7b97\u3084\u52a0\u5de5\u3092\u884c\u3063\u3066\u304b\u3089\u307e\u3068\u3081\u3066\u66f8\u304d\u623b\u3059\u3053\u3068\u3067\u3001\u51e6\u7406\u3092\u3088\u308a\u30b9\u30e0\u30fc\u30ba\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u914d\u5217\u306f\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u8a08\u7b97\u51e6\u7406\u3084\u4e00\u62ec\u7de8\u96c6\u3001\u30c7\u30fc\u30bf\u6574\u5f62\u306a\u3069\u306e\u5834\u9762\u3067\u6d3b\u7528\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u304f\u3001Excel VBA\u3067\u52b9\u7387\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u57fa\u672c\u7684\u306a\u30c6\u30af\u30cb\u30c3\u30af\u306e\u3072\u3068\u3064\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__1_2\" class=\"wp-block-heading\">\u914d\u5217\u3092\u5ba3\u8a00\u30fb\u5b9a\u7fa9\u3059\u308b<\/h3>\n\n\n\n<p>VBA\u3067\u306e\u914d\u5217\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u3001\u3055\u3063\u305d\u304f\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br>\u307e\u305a\u3001\u914d\u5217\u3092\u5ba3\u8a00\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u304c\u3001\u9759\u7684\u914d\u5217\u3068\u52d5\u7684\u914d\u5217\u3068\u3067\u914d\u5217\u3092\u5ba3\u8a00\u3059\u308b\u969b\u306e\u66f8\u304d\u65b9\u304c\u5c11\u3057\u7570\u306a\u308a\u307e\u3059\u3002<br>\u9759\u7684\u914d\u5217\u306e\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u9759\u7684\u914d\u5217\u306e\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Dim \u914d\u5217\u540d(\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7) As \u30c7\u30fc\u30bf\u578b<\/code><\/pre><\/div>\n\n\n\n<p>\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f<strong>0\u304b\u3089\u6570\u3048\u3066\u3044\u304f<\/strong>\u306e\u3067\u3001\u4f8b\u3048\u30703\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001\u914d\u5217\u5185\u306b\u5165\u308b\u8981\u7d20\u6570\u306f4\u3064\u306b\u306a\u308a\u307e\u3059\u3002\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306b\u306f\u3001\u5fc5\u8981\u306a\u8981\u7d20\u6570\u304b\u3089-1\u3057\u305f\u6570\u3092\u6307\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306f\u3001<strong>\u62ec\u5f27\u5185\u306e\u6570\u3092\u6307\u5b9a\u305b\u305a\u306b<\/strong>\u5ba3\u8a00\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u52d5\u7684\u914d\u5217\u306e\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Dim \u914d\u5217\u540d() As \u30c7\u30fc\u30bf\u578b<\/code><\/pre><\/div>\n\n\n\n<p>\u52d5\u7684\u914d\u5217\u3067\u306f\u3042\u3068\u304b\u3089\u8981\u7d20\u6570\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5ba3\u8a00\u3057\u305f\u6642\u70b9\u3067\u306f\u914d\u5217\u306e\u9577\u3055\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h3 id=\"outline__1_3\" class=\"wp-block-heading\">\u914d\u5217\u3092\u521d\u671f\u5316\u3059\u308b<\/h3>\n\n\n\n<p>\u521d\u671f\u5316\u306e\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<br>\u307e\u305a\u3001\u4efb\u610f\u306e\u5024\u3092\u521d\u671f\u5024\u3068\u3057\u3066\u5165\u308c\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u5404\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u5024\u3092\u4ee3\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u9759\u7684\u914d\u5217\u306e\u5834\u5408\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Dim arr(2) As String\narr(0) = &quot;A&quot;\narr(1) = &quot;B&quot;\narr(2) = &quot;C&quot;<\/code><\/pre><\/div>\n\n\n\n<p>\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306f\u3001\u5f8c\u307b\u3069\u8aac\u660e\u3059\u308bRedim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u4e8b\u524d\u306b\u8981\u7d20\u6570\u3092\u6c7a\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b<\/strong>\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Variant\u578b\u306e\u52d5\u7684\u914d\u5217\u306e\u307f\u306b\u9650\u3089\u308c\u307e\u3059\u304c\u3001<strong>Array\u95a2\u6570<\/strong>\u3092\u4f7f\u3063\u3066\u4e00\u62ec\u3067\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Dim arr2() As Variant\narr2 = Array(1, 2, 3)<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee3\u5165\u3057\u305f\u5024\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u521d\u671f\u5316\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b<strong>Erase\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Erase \u914d\u5217\u540d<\/code><\/pre><\/div>\n\n\n\n<p>\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306f\u8a2d\u5b9a\u3057\u305f\u8981\u7d20\u6570\u3068\u5024\u304c\u5168\u3066\u30af\u30ea\u30a2\u3055\u308c\u3001\u9759\u7684\u914d\u5217\u306e\u5834\u5408\u306f\u30c7\u30fc\u30bf\u578b\u306b\u5408\u308f\u305b\u3066\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u521d\u671f\u5024\u3067\u5168\u8981\u7d20\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u5024\u914d\u5217\uff1a0<\/li>\n\n\n\n<li>\u6587\u5b57\u5217\u914d\u5217\uff1a\u9577\u3055\uff10\u306e\u6587\u5b57\u5217<\/li>\n\n\n\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u914d\u5217\uff1aNothing<\/li>\n\n\n\n<li>\u30d0\u30ea\u30a2\u30f3\u30c8\u914d\u5217\uff1aEmpty<\/li>\n<\/ul>\n\n\n\n<h3 id=\"outline__1_4\" class=\"wp-block-heading\">\u914d\u5217\u3092\u518d\u5b9a\u7fa9\u3059\u308b<\/h3>\n\n\n\n<p>\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306b\u306f\u3001<strong>ReDim<\/strong>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u8981\u7d20\u6570\u3084\u30c7\u30fc\u30bf\u578b\u3092\u518d\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>ReDim \u914d\u5217\u540d(\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7) As \u30c7\u30fc\u30bf\u578b<\/code><\/pre><\/div>\n\n\n\n<p>\u305f\u3060\u3057\u3001<strong>\u518d\u5b9a\u7fa9\u3059\u308b\u524d\u306b\u5909\u66f4\u3057\u305f\u5024\u306f\u521d\u671f\u5316\u3055\u308c\u308b<\/strong>\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u30c7\u30fc\u30bf\u578b\u306e\u5909\u66f4\u304c\u53ef\u80fd\u306a\u306e\u306f\u3001<strong>\u5909\u66f4\u5143\u306e\u914d\u5217\u304cVariant\u578b\u306e\u5834\u5408\u306e\u307f<\/strong>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__1_5\" class=\"wp-block-heading\">Erase\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u914d\u5217\u306e\u30e1\u30e2\u30ea\u3092\u89e3\u653e\u3059\u308b<\/h3>\n\n\n\n<p>\u5148\u307b\u3069\u3001\u521d\u671f\u5316\u306e\u65b9\u6cd5\u3068\u3057\u3066\u7d39\u4ecb\u3057\u305fErase\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u3059\u304c\u3001\u52d5\u7684\u914d\u5217\u306e\u5834\u5408\u306b\u306f<strong>\u30e1\u30e2\u30ea\u3092\u89e3\u653e<\/strong>\u3059\u308b\u65b9\u6cd5\u3068\u3057\u3066\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u914d\u5217\u304cVariant\u578b\u306e\u5834\u5408\u3001\u6b21\u306e\u3088\u3046\u306b<strong>\u7a7a\u306e\u914d\u5217\u3092\u4ee3\u5165<\/strong>\u3059\u308b\u3053\u3068\u3067\u3082\u540c\u69d8\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Dim sample() As Variant\nsample = Array()<\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__1_6\" class=\"wp-block-heading\">\u591a\u6b21\u5143\u914d\u5217\u306e\u5ba3\u8a00\u30fb\u5b9a\u7fa9<\/h3>\n\n\n\n<p>\u914d\u5217\u306b\u306f\u8981\u7d20\u3068\u3057\u3066\u914d\u5217\u3092\u683c\u7d0d\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u914d\u5217\u306b\u914d\u5217\u304c\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u72b6\u614b\u306e\u3082\u306e\u3092<strong>\u591a\u6b21\u5143\u914d\u5217<\/strong>\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>VBA\u30672\u6b21\u5143\u4ee5\u4e0a\u306e\u914d\u5217\u3092\u5ba3\u8a00\u3059\u308b\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u300c,\u300d(\u30ab\u30f3\u30de)\u3067\u533a\u5207\u3063\u3066\u3001\u6b21\u5143\u3054\u3068\u306e\u8981\u7d20\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Dim \u914d\u5217\u540d(\u4e0a\u9650\u50241, \u4e0a\u9650\u50242, ...) As \u30c7\u30fc\u30bf\u578b<\/code><\/pre><\/div>\n\n\n\n<p>\u3088\u304f\u3042\u308b\u591a\u6b21\u5143\u914d\u5217\u306e\u5f62\u5f0f\u3068\u3044\u3048\u3070\u914d\u5217\u306e\u8981\u7d20\u306b\u914d\u5217\u3092\u683c\u7d0d\u3057\u305f\u5165\u308c\u5b50\u72b6\u306e\u914d\u5217\u3067\u3059\u304c\u3001VBA\u306b\u304a\u3051\u308b\u591a\u6b21\u5143\u914d\u5217\u306f\u3001\u6570\u5b66\u306b\u304a\u3051\u308b\u884c\u5217\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u8981\u7d20\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u914d\u5217\u306e\u8981\u7d20\u6570\u306f\u4e00\u5b9a\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u822c\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068VBA\u3067\u306e\u591a\u6b21\u5143\u914d\u5217\u306e\u5f62\u5f0f\u3092\u5927\u307e\u304b\u306b\u8868\u3059\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/\/ \u4e00\u822c\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u591a\u6b21\u5143\u914d\u5217\narray[i][j]\n\n\/\/ VBA\u306b\u304a\u3051\u308b\u591a\u6b21\u5143\u914d\u5217\narray(i, j)<\/code><\/pre><\/div>\n\n\n\n<p>\u5b9f\u969b\u306b\u591a\u6b21\u5143\u914d\u5217\u3092\u6271\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub Sample2DArray()\n    Dim arr(1 To 3, 1 To 3) As Variant\n    Dim i As Long, j As Long\n\n    &#39; \u4e8c\u6b21\u5143\u914d\u5217\u306b\u81ea\u52d5\u7684\u306b\u5024\u3092\u4ee3\u5165\u3059\u308b\n    For i = LBound(arr, 1) To UBound(arr, 1)\n        For j = LBound(arr, 2) To UBound(arr, 2)\n            &#39; Chr(64 + j) \u3092\u4f7f\u3063\u3066\u3001\u5217\u756a\u53f7 1=&gt; &quot;A&quot;, 2=&gt; &quot;B&quot;, 3=&gt; &quot;C&quot; \u306b\u5909\u63db\n            arr(i, j) = Chr(64 + j) & i\n        Next j\n    Next i\n\n    &#39; \u4ee3\u5165\u3055\u308c\u305f\u5404\u8981\u7d20\u3092\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u51fa\u529b\n    For i = LBound(arr, 1) To UBound(arr, 1)\n        For j = LBound(arr, 2) To UBound(arr, 2)\n            Debug.Print &quot;arr(&quot; & i & &quot;, &quot; & j & &quot;) = &quot; & arr(i, j)\n        Next j\n    Next i\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>arr(1, 1) = A1\narr(1, 2) = B1\narr(1, 3) = C1\narr(2, 1) = A2\narr(2, 2) = B2\narr(2, 3) = C2\narr(3, 1) = A3\narr(3, 2) = B3\narr(3, 3) = C3<\/code><\/pre><\/div>\n\n\n\n<p>\u30bb\u30eb\u306e\u4f4d\u7f6e\u306f\u4e8c\u6b21\u5143\u306e\u914d\u5217\u3067\u8868\u305b\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30bb\u30eb\u306e\u7bc4\u56f2\u9078\u629e\u3084\u4e00\u62ec\u3067\u51e6\u7406\u3059\u308b\u3088\u3046\u306a\u5834\u9762\u3067\u306f\u5fc5\u305a\u3068\u8a00\u3063\u3066\u3044\u3044\u307b\u3069\u4e8c\u6b21\u5143\u914d\u5217\u306e\u64cd\u4f5c\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u969b\u306b\u3001\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8868\u3059 Cells \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u3069\u306f\u5f15\u6570\u30922\u3064\u53d6\u308a\u3001\u4e8c\u6b21\u5143\u914d\u5217\u3067\u8868\u3055\u308c\u308b\u5f62\u5f0f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010Cells\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f8b\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Cells(1, 1)<\/code><\/pre><\/div>\n\n\n\n<p>Cells \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u5834\u5408\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3082\u3054\u89a7\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-techmania wp-block-embed-techmania\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"911k4IoKZY\"><a href=\"https:\/\/techmania.jp\/blog\/vba-cells\/\">\u3010VBA Cells\u3011\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u30fb\u5fdc\u7528\u4f8b\u3092\u89e3\u8aac<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010VBA Cells\u3011\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u30fb\u5fdc\u7528\u4f8b\u3092\u89e3\u8aac&#8221; &#8212; TechMania\" src=\"https:\/\/techmania.jp\/blog\/vba-cells\/embed\/#?secret=GRJOprIURr#?secret=911k4IoKZY\" data-secret=\"911k4IoKZY\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 id=\"outline__2\" class=\"wp-block-heading\">\u30b7\u30fc\u30c8\u4e0a\u306e\u30bb\u30eb\u30fbVBA\u306e\u914d\u5217\u9593\u3067\u8981\u7d20\u306e\u5024\u3092\u5171\u6709\u3059\u308b<\/h2>\n\n\n\n<p>\u6b21\u306b\u3001\u30b7\u30fc\u30c8\u4e0a\u306e\u30bb\u30eb\u3068VBA\u306e\u914d\u5217\u9593\u3067\u8981\u7d20\u306e\u5024\u3092\u5171\u6709\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bb\u30eb\u30921\u3064\u305a\u3064\u8aad\u307f\u66f8\u304d\u3059\u308b\u51e6\u7406\u306f\u3001\u30c7\u30fc\u30bf\u91cf\u304c\u5897\u3048\u308b\u307b\u3069\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u5b9f\u52d9\u3067\u306f\u3001\u5bfe\u8c61\u7bc4\u56f2\u3092\u3044\u3063\u305f\u3093\u914d\u5217\uff08Variant\uff09\u306b\u8aad\u307f\u8fbc\u307f\u3001\u914d\u5217\u4e0a\u3067\u52a0\u5de5\u3057\u3066\u304b\u3089\u307e\u3068\u3081\u3066\u66f8\u304d\u623b\u3059\u65b9\u6cd5\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u30bb\u30eb\u306e\u5024\u3092\u914d\u5217\u306b\u4ee3\u5165\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleArray1()\n\n\u3000Dim arr As Variant\n\u3000Dim msg As String\n    \n\u3000arr = Range(&quot;A1:B3&quot;).Value\n    \n\u3000msg = arr(1, 1) & &quot;,&quot; & arr(1, 2) & vbCrLf _\n\u3000& arr(2, 1) & &quot;,&quot; & arr(2, 2) & vbCrLf _\n\u3000& arr(3, 1) & &quot;,&quot; & arr(3, 2) & vbCrLf\n\n\u3000MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array01.png\" class=\"post-img\">\n\n\n\n<p>\u30bb\u30eb\u3068\u914d\u5217\u9593\u3067\u5024\u3092\u5171\u6709\u3059\u308b\u5834\u5408\u3001\u8981\u7d20\u6570\u306f\u305d\u308c\u305e\u308c<br>\u300c\u4e00\u6b21\u5143\u76ee\uff1d\u884c\u6570\uff081, 2, &#8230;\uff09\u300d\u300c\u4e8c\u6b21\u5143\u76ee\uff1d\u5217\u6570\uff08A, B, &#8230;\uff09\u300d<br>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u30bb\u30eb\u306e\u5024\u3092\u5909\u6570\u306b\u4ee3\u5165\u3057\u305f\u5834\u5408\u3001\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f<strong>0\u304b\u3089\u3067\u306f\u306a\u304f1\u304b\u3089\u306e\u958b\u59cb<\/strong>\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__2_1\" class=\"wp-block-heading\">\u8981\u7d20\u306e\u5024\u3092\u30bb\u30eb\u306b\u683c\u7d0d\u3059\u308b<\/h3>\n\n\n\n<p>\u4eca\u5ea6\u306f\u53cd\u5bfe\u306b\u3001VBA\u306e\u914d\u5217\u306e\u8981\u7d20\u3092\u30b7\u30fc\u30c8\u4e0a\u306e\u30bb\u30eb\u306b\u4e00\u62ec\u3067\u683c\u7d0d\u3059\u308b\u65b9\u6cd5\u3092\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleArray2()\n\n    Dim arr(3, 2) As Variant\n\n    Dim line As Integer, row As Integer\n    \n    For line = 0 To 2\n        For row = 0 To 3\n            arr(row, line) = row + 1 + 10 * line\n        Next row\n    Next line\n    \n    Range(&quot;A1:B3&quot;).Value = arr\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array02.png\" class=\"post-img\">\n\n\n\n<p>\u914d\u5217\u306e\u8981\u7d20\u3092\u30bb\u30eb\u306b\u683c\u7d0d\u3059\u308b\u5834\u5408\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f0\u304b\u3089\u306e\u958b\u59cb\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u540c\u3058\u914d\u5217\u306b\u30bb\u30eb\u306e\u5024\u3092\u5165\u308c\u76f4\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u5148\u307b\u3069\u3068\u540c\u3058\u304f\uff11\u304b\u3089\u306e\u958b\u59cb\u306b\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__2_2\" class=\"wp-block-heading\">UBound\u3067\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<p>\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u4e0a\u306e\u5024\u3092\u53d6\u5f97\u3057\u3066\u4ee3\u5165\u3059\u308b\u306a\u3069\u3067\u51e6\u7406\u306e\u9014\u4e2d\u3067\u751f\u6210\u3055\u308c\u305f\u52d5\u7684\u914d\u5217\u3092\u6271\u3046\u969b\u306b\u306f\u3001\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u77e5\u308a\u305f\u3044\u30b1\u30fc\u30b9\u3082\u3088\u304f\u3042\u308b\u3053\u3068\u3067\u3059\u304c\u3001VBA\u306b\u306f\u914d\u5217\u306e\u8981\u7d20\u6570\u3084\u9577\u3055\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u4ee3\u308f\u308a\u306b\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306e\u6700\u5927\u5024\u3092\u53d6\u5f97\u3059\u308b<strong>UBound\u95a2\u6570<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u8a08\u7b97\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<br>\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/images\/techmania\/thumbnail\/images\/vba_LBound.webp\" class=\"post-img\" alt=\"LBound UBound\" loading=\"lazy\">\n<br>\n\n\n\n<p>\u30fbLBound = \u914d\u5217\u306e\u300c\u6700\u521d\u306e\u756a\u53f7\u300d<br>\u30fbUBound = \u914d\u5217\u306e\u300c\u6700\u5f8c\u306e\u756a\u53f7\u300d<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\u8981\u7d20\u6570 = UBound\u95a2\u6570 + 1<\/code><\/pre><\/div>\n\n\n\n<p>\u958b\u59cb\u756a\u53f7\u304c0\u4ee5\u5916\u306e\u30b1\u30fc\u30b9\u304c\u3042\u308b\u5834\u5408\u306f\u3001<strong>LBound\u95a2\u6570<\/strong>\u3092\u4f7f\u3046\u306a\u3069\u3057\u3066\u6700\u5c0f\u5024\u5206\u3092\u5f15\u304f\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002\u914d\u5217\u306f\u958b\u59cb\u756a\u53f7\u3084\u8981\u7d20\u6570\u304c\u72b6\u6cc1\u306b\u3088\u3063\u3066\u5909\u308f\u308b\u305f\u3081\u3001\u56fa\u5b9a\u306e\u6570\u5024\u3067\u306f\u306a\u304fLBound\u3068UBound\u3092\u4f7f\u3063\u3066\u30eb\u30fc\u30d7\u51e6\u7406\u3092\u884c\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<h4 id=\"outline__2_2_1\" class=\"wp-block-heading\">1\u6b21\u5143\u914d\u5217\u3067\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3059\u308b<\/h4>\n\n\n\n<p>1\u6b21\u5143\u914d\u5217\u3067\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f\u3001UBound\u95a2\u6570\u3084LBound\u95a2\u6570\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>UBound(\u914d\u5217\u540d)\nLBound(\u914d\u5217\u540d)<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Sub GetArrayCount()\n    \n    Dim arr() As Variant\n    Dim lowerIndex As Long\n    Dim upperIndex As Long\n    Dim count As Long\n    \n    &#39; \u914d\u5217\u306b\u5024\u3092\u8a2d\u5b9a\uff08\u56fa\u5b9a\u9577\uff0f\u30ea\u30c6\u30e9\u30eb\u914d\u5217\u306e\u4f8b\uff09\n    arr = Array(&quot;Apple&quot;, &quot;Banana&quot;, &quot;Cherry&quot;, &quot;Date&quot;)\n    \n    &#39; \u914d\u5217\u304c\u7a7a\u3067\u306a\u3044\u304b\u30c1\u30a7\u30c3\u30af\n    If Not IsArray(arr) Then\n        MsgBox &quot;\u914d\u5217\u304c\u521d\u671f\u5316\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002&quot;, vbExclamation\n        Exit Sub\n    End If\n    \n    &#39; \u6700\u5c0f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d6\u5f97\n    lowerIndex = LBound(arr)\n    upperIndex = UBound(arr)\n    \n    &#39; \u8981\u7d20\u6570\u3092\u8a08\u7b97\uff08UBound - LBound + 1\uff09\n    count = upperIndex - lowerIndex + 1\n    \n    &#39; \u7d50\u679c\u3092\u8868\u793a\n    MsgBox &quot;\u914d\u5217\u306e\u8981\u7d20\u6570\u306f &quot; & count & &quot; \u3067\u3059\u3002&quot;, vbInformation\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\u914d\u5217\u306e\u8981\u7d20\u6570\u306f4\u3067\u3059\u3002<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u6700\u5c0f\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c0\u3067\u306f\u306a\u3044\u5834\u5408\u3082\u8003\u616e\u3057\u3066LBound\u95a2\u6570\u3068UBound\u95a2\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u95a2\u308f\u3089\u305a\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__3\" class=\"wp-block-heading\">\u30eb\u30fc\u30d7\u3067\u914d\u5217\u3092\u64cd\u4f5c\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u306e\u5404\u8981\u7d20\u3092\u64cd\u4f5c\u3059\u308b\u5834\u5408\u3001\u30eb\u30fc\u30d7\u3092\u4f7f\u3046\u3068\u52b9\u7387\u304c\u4e0a\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u3067\u305d\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__3_1\" class=\"wp-block-heading\">For\u30eb\u30fc\u30d7\u3067\u914d\u5217\u3092\u64cd\u4f5c\u3059\u308b<\/h3>\n\n\n\n<p>\u307e\u305a\u306f\u3001<strong>For Next<\/strong>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3046\u65b9\u6cd5\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u3001\u5404\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>For \u5909\u6570\u540d = \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6700\u5c0f\u5024 To \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6700\u5927\u5024\n    &#39;arr(\u5909\u6570\u540d)\u3067\u9806\u306b\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\nNext \u5909\u6570\u540d<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub ArrayLoop()\n    Dim arr(2) As Variant\n    Dim sum As Variant\n    arr(0) = 1\n    arr(1) = 2\n    arr(2) = 3\n    For i = 0 To 2\n        sum = sum + arr(i)\n    Next i\n    MsgBox sum\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p>For&#8230;Next\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u306f\u30eb\u30fc\u30d7\u56de\u6570\u3092\u6307\u5b9a\u3057\u3066\u30b7\u30f3\u30d7\u30eb\u306a\u30eb\u30fc\u30d7\u51e6\u7406\u3092\u884c\u3046\u306e\u3067\u3001\u8981\u7d20\u6570\u306b\u5fdc\u3058\u305f\u30eb\u30fc\u30d7\u56de\u6570\u306e\u6307\u5b9a\u3092\u6b63\u3057\u304f\u8a18\u8ff0\u3059\u308b\u3088\u3046\u306b\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e00\u65b9\u3067\u3001\u914d\u5217\u306b\u5bfe\u3059\u308b\u30eb\u30fc\u30d7\u64cd\u4f5c\u3067\u306fFor Each\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3046\u3053\u3068\u3067\u30eb\u30fc\u30d7\u56de\u6570\u3092\u6307\u5b9a\u305b\u305a\u3001\u5168\u3066\u306e\u8981\u7d20\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30d7\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u8981\u7d20\u6570\u304c\u5909\u52d5\u3059\u308b\u52d5\u7684\u914d\u5217\u3078\u306e\u64cd\u4f5c\u306e\u30df\u30b9\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__3_2\" class=\"wp-block-heading\">For Each\u30eb\u30fc\u30d7\u3067\u914d\u5217\u3092\u64cd\u4f5c\u3059\u308b<\/h3>\n\n\n\n<p><strong>For Each\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong>\u3092\u4f7f\u3046\u3068\u8981\u7d20\u6570\u306b\u5fdc\u3058\u3066\u30eb\u30fc\u30d7\u51e6\u7406\u3092\u3057\u3066\u304f\u308c\u308b\u305f\u3081\u3001\u3088\u308a\u624b\u77ed\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>For Each \u5909\u6570\u540d In \u914d\u5217\u540d\n    &#39;\u5909\u6570\u306b\u8981\u7d20\u306e\u5024\u304c\u5165\u308b\u306e\u3067\u3001\u5909\u6570\u3092\u4f7f\u3063\u3066\u51e6\u7406\nNext \u5909\u6570\u540d<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub ArrayForEach()\n    Dim dynArr() As Variant\n    Dim sum As Variant\n    dynArr() = Array(1, 2, 3, 4, 5)\n    For Each Elem In dynArr()\n        sum = sum + Elem\n    Next Elem\n    MsgBox sum\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p>For Each\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306b\u3088\u308b\u30eb\u30fc\u30d7\u64cd\u4f5c\u306f\u9577\u3055\u304c\u5909\u52d5\u3059\u308b\u52d5\u7684\u914d\u5217\u3067\u306e\u51e6\u7406\u3084\u3001\u914d\u5217\u306e\u8981\u7d20\u81ea\u4f53\u306b\u306f\u5909\u66f4\u3092\u52a0\u3048\u306a\u3044\u5834\u5408\u3001\u914d\u5217\u306e\u8981\u7d20\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\u5834\u5408\u306a\u3069\u306bFor\u30eb\u30fc\u30d7\u3088\u308a\u3082\u5b89\u5168\u306b\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__4\" class=\"wp-block-heading\">\u914d\u5217\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u3092\u5225\u306e\u5909\u6570\u306b\u30b3\u30d4\u30fc\u3059\u308b\u5834\u5408\u306f\u3001<strong>\u52d5\u7684\u914d\u5217\u306b\u4ee3\u5165<\/strong>\u3059\u308b\u3053\u3068\u3067\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002<br>Variant\u578b\u3067\u3042\u308c\u3070\u3001\u901a\u5e38\u306e\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleCopy()\n\n\u3000Dim arr1() As Variant, arr2 As Variant\n\n\u3000arr1 = Array(&quot;\u308a\u3093\u3054&quot;, &quot;\u307f\u304b\u3093&quot;, &quot;\u3076\u3069\u3046&quot;)\n\u3000arr2 = arr1\n\n\u3000Dim msg As String\n\n\u3000For Each st In arr2\n\u3000\u3000msg = msg & st & &quot;\u3000&quot;\n\u3000Next st\n    \n\u3000MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array03.png\" class=\"post-img\">\n\n\n\n<h2 id=\"outline__5\" class=\"wp-block-heading\">\u914d\u5217\u3092\u30bd\u30fc\u30c8\u3059\u308b<\/h2>\n\n\n\n<p>VBA\u306e\u5834\u5408\u3001\u914d\u5217\u305d\u306e\u3082\u306e\u3092\u30bd\u30fc\u30c8\u3059\u308b\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>VBA\u4e0a\u3067\u5b8c\u7d50\u3055\u305b\u308b\u5834\u5408\u306f\u30eb\u30fc\u30d7\u3092\u5229\u7528\u3057\u3066\u4e26\u3079\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u3076\u3093\u30b3\u30fc\u30c9\u3082\u8907\u96d1\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u4e00\u65e6\u914d\u5217\u306e\u8981\u7d20\u3092\u30bb\u30eb\u306b\u79fb\u3057\u3001<strong>Sort\u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u4f7f\u3063\u3066\u4e26\u3079\u66ff\u3048\u3092\u884c\u3063\u3066\u304b\u3089\u3001\u30bb\u30eb\u306e\u5185\u5bb9\u3092\u518d\u5ea6\u914d\u5217\u306b\u4ee3\u5165\u3057\u76f4\u3059\u65b9\u6cd5\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010Sort\u30e1\u30bd\u30c3\u30c9\u306e\u69cb\u6587\u4f8b\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Range(&quot;\u7bc4\u56f2&quot;).Sort Key1:=Range(&quot;\u30ad\u30fc&quot;), Order1:=xlAscending<\/code><\/pre><\/div>\n\n\n\n<p><strong>Key1<\/strong>\u306f\u30bd\u30fc\u30c8\u306e\u57fa\u6e96\u3068\u306a\u308b\u5217\u3001<strong>Order1<\/strong>\u306f\u4e26\u3073\u66ff\u3048\u306e\u9806\u5e8f\uff08\u6607\u9806\u3084\u964d\u9806\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__6\" class=\"wp-block-heading\">\u914d\u5217\u306e\u8981\u7d20\u3092\u691c\u7d22\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u306e\u4e2d\u304b\u3089\u3001\u6307\u5b9a\u3057\u305f\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u8981\u7d20\u3092\u691c\u7d22\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001<strong>Filter\u95a2\u6570<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<br>Filter\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Filter(sourcearray,match[,include[,compare]])<\/code><\/pre><\/div>\n\n\n\n<p><strong>include<\/strong>\u306f\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u542b\u3080\u8981\u7d20\u3092\u691c\u7d22\u3059\u308b\u304b\u5426\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u542b\u3080\u5834\u5408\u306f<strong>True<\/strong>\u3001\u542b\u307e\u306a\u3044\u5834\u5408\u306f<strong>False<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>compare<\/strong>\u306f\u3001\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u30e2\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u300c<strong>vbBinaryCompare<\/strong>\u300d\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306f\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u3066\u691c\u7d22\u3057\u3001\u300c<strong>vbTextCompare<\/strong>\u300d\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306f\u533a\u5225\u305b\u305a\u306b\u691c\u7d22\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>[ ]\u5185\u306e2\u3064\u306f<strong>\u7701\u7565\u53ef\u80fd<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3001\u5b9f\u969b\u306e\u52d5\u304d\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleFilter()\n\n\u3000Dim arr() As Variant, fArray As Variant\n\n\u3000arr = Array(&quot;Windows10&quot;, &quot;windows11&quot;, &quot;macOS&quot;, &quot;WindowsXP&quot;) \n\u3000fArray = Filter(arr, &quot;Windows&quot;)\n\n\u3000Dim msg As String\n\n\u3000For Each st In fArray\n        msg = msg & st & &quot;\u3000&quot;\n\u3000Next st\n\n\u3000MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array04.png\" class=\"post-img\">\n\n\n\n<p><strong>include<\/strong>\u306f\u7701\u7565\u3059\u308b\u3068\u30c7\u30d5\u30a9\u30eb\u30c8\u3067<strong>True<\/strong>\u3068\u306a\u308a\u3001<strong>compare<\/strong>\u306e\u5834\u5408\u306f<strong>vbBinaryCompare<\/strong>\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6307\u5b9a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__7\" class=\"wp-block-heading\">\u914d\u5217\u306e\u8981\u7d20\u3092\u8ffd\u52a0\u30fb\u524a\u9664\u3059\u308b<\/h2>\n\n\n\n<p>\u7d9a\u3044\u3066\u3001\u914d\u5217\u306e\u8981\u7d20\u3092\u8ffd\u52a0\u30fb\u524a\u9664\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__7_1\" class=\"wp-block-heading\">\u914d\u5217\u306e\u8981\u7d20\u3092\u8ffd\u52a0\u3059\u308b<\/h3>\n\n\n\n<p>\u8981\u7d20\u306e\u6570\u3092\u5897\u3084\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5148\u307b\u3069\u3082\u7d39\u4ecb\u3057\u305f<strong>ReDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001ReDim\u3092\u4f7f\u7528\u3059\u308b\u3068\u65e2\u306b\u8a2d\u5b9a\u3057\u305f\u8981\u7d20\u306e\u5024\u304c\u524a\u9664\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u5024\u3092\u4fdd\u6301\u3057\u305f\u307e\u307e\u914d\u5217\u306e\u8981\u7d20\u6570\u3060\u3051\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001<strong>ReDim Preserve\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>ReDim Preserve \u914d\u5217\u540d(\u6700\u5927\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7)<\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__7_2\" class=\"wp-block-heading\">\u914d\u5217\u306e\u8981\u7d20\u3092\u524a\u9664\u3059\u308b<\/h3>\n\n\n\n<p>\u8981\u7d20\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u3067\u3059\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u3001VBA\u306b\u306f\u914d\u5217\u306e\u4e00\u90e8\u3092\u524a\u9664\u3059\u308b\u6a5f\u80fd\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u4ee3\u308f\u308a\u306b\u3001ReDim Preserve\u3092\u5fdc\u7528\u3057\u3066\u524a\u9664\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleRemove()\n\n\u3000Dim arr() As Variant\n\u3000arr = Array(0, 1, 2, 3, 4)\n\n\u3000&#39;3\u756a\u76ee\u306e\u8981\u7d20\u3092\u524a\u9664\n\u3000For i = 2 To UBound(arr) - 1\n\u3000\u3000arr(i) = arr(i + 1)\n\u3000Next i\n\n\u3000ReDim Preserve arr(UBound(arr) - 1)\n\n\u3000Dim msg As String\n\n\u3000For Each st In arr\n\u3000\u3000msg = msg & st & &quot;\u3000&quot;\n\u3000Next st\n\n\u3000MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array05.png\" class=\"post-img\">\n\n\n\n<p>\u30dd\u30a4\u30f3\u30c8\u306f\u3001<strong>\u524a\u9664\u3057\u305f\u3044\u8981\u7d20\u304b\u3089\u30eb\u30fc\u30d7\u3092\u958b\u59cb<\/strong>\u3057\u3066\u3001<strong>\uff11\u3064\u96a3\u306e\u5024<\/strong>\u3092\u524a\u9664\u3057\u305f\u3044\u8981\u7d20\u306b\u4e0a\u66f8\u304d\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p>ReDim Preserve\u3067\u8981\u7d20\u6570\u3092\u6e1b\u3089\u3059\u3068\u540c\u6642\u306b<strong>\u6700\u5f8c\u306e\u5024\u3082\u524a\u9664\u3055\u308c\u308b<\/strong>\u306e\u3067\u3001\u4e8b\u524d\u306b\u5024\u306e\u4f4d\u7f6e\u3092\u524d\u306b\u305a\u3089\u3059\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u5fc5\u8981\u306a\u5024\u3060\u3051\u3092\u914d\u5217\u306b\u6b8b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__8\" class=\"wp-block-heading\">\u914d\u5217\u306e\u8981\u7d20\u3092\u7d50\u5408\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u5185\u306e\u5024\u3084\u3001\u5225\u3005\u306e\u914d\u5217\u540c\u58eb\u3092\u7d50\u5408\u3057\u305f\u3044\u30b1\u30fc\u30b9\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u308c\u305e\u308c\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 id=\"outline__8_1\" class=\"wp-block-heading\">1\u3064\u306e\u914d\u5217\u306e\u8981\u7d20\u3092\u7d50\u5408\u3059\u308b<\/h3>\n\n\n\n<p>\u914d\u5217\u5185\u306e\u8981\u7d20\u540c\u58eb\u3092\u7d50\u5408\u3059\u308b\u5834\u5408\u306f\u3001<strong>Join\u95a2\u6570<\/strong>\u3092\u4f7f\u3046\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<p>Join\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3057\u305f\u914d\u5217\u5185\u306e\u8981\u7d20\u5168\u3066\u3092\u9806\u306b\u7d50\u5408\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Join(\u914d\u5217\u540d\u3001 [\u533a\u5207\u308a\u6587\u5b57])<\/code><\/pre><\/div>\n\n\n\n<p>\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8981\u7d20\u540c\u58eb\u306e\u9593\u3092\u305d\u306e\u6587\u5b57\u5217\u3067\u533a\u5207\u3063\u3066\u7d50\u5408\u3057\u307e\u3059\u3002\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u304c\u9593\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__8_2\" class=\"wp-block-heading\">Join\u3068Split\u3067\u914d\u5217\u3092\u9023\u7d50\u3059\u308b<\/h3>\n\n\n\n<p>\u5225\u3005\u306e\u914d\u5217\u3092\uff11\u3064\u306b\u9023\u7d50\u3059\u308b\u95a2\u6570\u306fVBA\u306b\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u4ee3\u308f\u308a\u306b<strong>Split\u95a2\u6570<\/strong>\u3068<strong>Join\u95a2\u6570<\/strong>\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u521d\u3081\u306b\u3001Join\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u914d\u5217\u5185\u306e\u8981\u7d20\u3092\u7d50\u5408\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u7d50\u5408\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u51fa\u6765\u4e0a\u304c\u3063\u305f\u6587\u5b57\u5217\u540c\u58eb\u3092\u300c&amp;\u300d\u8a18\u53f7\u3092\u4f7f\u3063\u3066\u3055\u3089\u306b\u7d50\u5408\u3057\u3001\u4e00\u3064\u306e\u6587\u5b57\u5217\u306b\u307e\u3068\u3081\u307e\u3057\u3087\u3046\u3002\u305d\u306e\u969b\u3001\u95a2\u6570\u3067\u6307\u5b9a\u3057\u305f\u533a\u5207\u308a\u6587\u5b57\u3092\u3001\u305d\u308c\u305e\u308c\u306e\u6587\u5b57\u5217\u306e\u9593\u306b\u631f\u3080\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001\u7d50\u5408\u3057\u305f\u6587\u5b57\u5217\u3092Split\u95a2\u6570\u3067\u5206\u5272\u3057\u3066\u3001\u914d\u5217\u306e\u5404\u8981\u7d20\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u914d\u5217\u3092\uff11\u3064\u306b\u9023\u7d50\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u969b\u306e\u6d41\u308c\u3092\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleJoinSplit()\n\n\u3000Dim arr1() As Variant, arr2() As Variant, arr3 As Variant\n\n\u3000arr1 = Array(1, 2)\n\u3000arr2 = Array(3, 4, 5)\n\u3000arr3 = Split(Join(arr1) & &quot; &quot; & Join(arr2))\n\n\u3000Dim msg As String\n\n\u3000For Each st In arr3\n\u3000\u3000msg = msg & st & &quot;,\u3000&quot;\n\u3000Next st\n    \n\u3000MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array06.png\" class=\"post-img\">\n\n\n\n<h2 id=\"outline__9\" class=\"wp-block-heading\">\u914d\u5217\u540c\u58eb\u3092\u6bd4\u8f03\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u540c\u58eb\u3092\u6bd4\u8f03\u3059\u308b\u969b\u3001\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066\u8981\u7d20\u3054\u3068\u306b\u6bd4\u8f03\u3092\u884c\u3046\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u51e6\u7406\u304c\u8907\u96d1\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u540c\u4e00\u304b\u5426\u304b\u3060\u3051\u3092\u5224\u65ad\u3057\u305f\u3044\u5834\u5408\u306f\u3001<strong>Join\u95a2\u6570\u3092\u4f7f\u3063\u3066\u8981\u7d20\u3092\u7d50\u5408\u3057\u305f\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b<\/strong>\u3068\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub sampleCompare()\n\n    Dim arr1() As Variant, arr2() As Variant\n    arr1 = Array(&quot;11&quot;, &quot;21&quot;, &quot;322&quot;, &quot;27&quot;, &quot;43&quot;)\n    arr2 = Array(&quot;11&quot;, &quot;21&quot;, &quot;321&quot;, &quot;27&quot;, &quot;43&quot;)\n    \n    If Join(arr1) = Join(arr2) Then\n        MsgBox &quot;\u540c\u3058\u914d\u5217\u3067\u3059&quot;\n    Else\n        MsgBox &quot;\u9055\u3046\u914d\u5217\u3067\u3059&quot;\n    End If\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array07.png\" class=\"post-img\">\n\n\n\n<h2 id=\"outline__10\" class=\"wp-block-heading\">\u5b9a\u6570\u3067\u914d\u5217\u3092\u5ba3\u8a00\u3059\u308b<\/h2>\n\n\n\n<p>VBA\u3067\u306f\u3001\u914d\u5217\u3092\u5b9a\u6570\u3068\u3057\u3066\u5ba3\u8a00\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u308c\u306fVBA\u306e\u5b9a\u6570\u306e\u4ed5\u69d8\u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p>VBA\u306b\u304a\u3051\u308b\u5b9a\u6570\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u56fa\u5b9a\u3055\u308c\u305f\u660e\u78ba\u306a\u5358\u4e00\u306e\u5024\u3092\u6301\u3064\u3082\u306e\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u56fa\u5b9a\u3055\u308c\u305f\u660e\u78ba\u306a\u5358\u4e00\u306e\u5024\u3092\u6301\u3064\u30c7\u30fc\u30bf\u578b\u306f\u3001\u6570\u5024\u3001\u6587\u5b57\u5217\u3001\u771f\u507d\u5024\u3068\u3044\u3063\u305f\u3082\u306e\u304c\u8a72\u5f53\u3057\u307e\u3059\u3002<br>\u305d\u306e\u4e00\u65b9\u3067\u3001\u914d\u5217\u306b\u306f\u8907\u6570\u306e\u5024\u304c\u683c\u7d0d\u3055\u308c\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u9577\u3055\u304c1\u306e\u914d\u5217\u3067\u3042\u3063\u3066\u3082\u3001\u914d\u5217\u578b\u305d\u306e\u3082\u306e\u304c\u30c7\u30fc\u30bf\u306e\u96c6\u5408\u4f53\u3068\u3044\u3046\u6027\u8cea\u3092\u6301\u3063\u3066\u3044\u308b\u4ee5\u4e0a\u3001\u5b9a\u6570\u3068\u3057\u3066\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u4ed5\u69d8\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001\u53b3\u5bc6\u306a\u5b9a\u6570\u3068\u306f\u3044\u304d\u307e\u305b\u3093\u304c\u3001\u5b9a\u6570\u306e\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066\u914d\u5217\u3078\u683c\u7d0d\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Const str As String = &quot;1,2,3,4,5&quot;\n\nSub sampleConst()\n    \n    Dim arr As Variant\n    \n    arr = Split(str, &quot;,&quot;)\n    \n    Dim msg As String\n\n    For Each st In arr\n        msg = msg & st & &quot;\u3000&quot;\n    Next st\n    \n    MsgBox msg\n\nEnd Sub<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u3010\u5b9f\u884c\u7d50\u679c\u3011<\/strong><\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array08.png\" class=\"post-img\">\n\n\n\n<h2 id=\"outline__11\" class=\"wp-block-heading\">\u914d\u5217\u3092\u95a2\u6570\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b<\/h2>\n\n\n\n<p>\u914d\u5217\u3092\u95a2\u6570\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u5f15\u6570\u540d\u306e\u5f8c\u306b\u62ec\u5f27\u3092\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Sub \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d(\u914d\u5217\u540d() As \u30c7\u30fc\u30bf\u578b)<\/code><\/pre><\/div>\n\n\n\n<p>\u623b\u308a\u5024\u306b\u914d\u5217\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u623b\u308a\u5024\u306e\u30c7\u30fc\u30bf\u578b\u306e\u5f8c\u306b\u62ec\u5f27\u3092\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u57fa\u672c\u69cb\u6587\u3011<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-vba\" data-lang=\"VBA\"><code>Function \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d(\u914d\u5217\u540d() As \u30c7\u30fc\u30bf\u578b) As \u30c7\u30fc\u30bf\u578b()<\/code><\/pre><\/div>\n\n\n\n<h2 id=\"outline__12\" class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u914d\u5217\u306f\u3001\u69d8\u3005\u306a\u5834\u9762\u306b\u5fdc\u7528\u3057\u3066\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u3002\u7279\u306b\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3063\u305f\u308a\u3001\u30c7\u30fc\u30bf\u3092\u9806\u756a\u306b\u51e6\u7406\u3057\u3066\u3044\u304f\u5834\u9762\u3067\u306f\u5fc5\u9808\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u521d\u3081\u306e\u3046\u3061\u306f\u6163\u308c\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u30de\u30b9\u30bf\u30fc\u3067\u304d\u308b\u3088\u3046\u306b\u9811\u5f35\u3063\u3066\u304f\u3060\u3055\u3044\u306d\uff01<\/p>\n\n\n\n<h2 id=\"outline__13\" class=\"wp-block-heading\">\u95a2\u9023\u8a18\u4e8b<\/h2>\n\n\n<ul>\n<li><a href=\"https:\/\/techmania.jp\/blog\/vba0001\/\" target=\"_blank\" rel=\"noopener\">VBA\u3068\u306f<\/a><\/li>\n<li><a href=\"https:\/\/techmania.jp\/blog\/excel-function\/\" target=\"_blank\" rel=\"noopener\">Excel\u3067\u899a\u3048\u3066\u304a\u304f\u3079\u304d17\u306e\u57fa\u672c\u95a2\u6570\u3068\u76ee\u7684\u5225\u9006\u5f15\u304d\u4e00\u89a7<\/a><\/li>\n<li><a href=\"https:\/\/techmania.jp\/blog\/vba-autofilter\/\" target=\"_blank\" rel=\"noopener\">\u30aa\u30fc\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u8a2d\u5b9a\u30fb\u89e3\u9664\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/techmania.jp\/blog\/excel-vba-msgbox\/\" target=\"_blank\" rel=\"noopener\">\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c3\u30af\u30b9\u306e\u8a2d\u5b9a\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/techmania.jp\/blog\/excel-vba-value\/\">\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u30fb\u4e0a\u66f8\u304d\u3059\u308bValue\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac<\/a><\/li>\n<li><a href=\"https:\/\/techmania.jp\/blog\/excel-vba-function\/\">\u3010Excel VBA\u3011Function\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac\uff08\u5ba3\u8a00\u30fb\u5f15\u6570\u3001\u623b\u308a\u5024\u306e\u6307\u5b9a\u3001\u5fdc\u7528\u6cd5\uff09<\/a><\/li>\n<\/ul>\n\n\n<h2 id=\"outline__14\" class=\"wp-block-heading\">VBA\u306e\u52c9\u5f37\u65b9\u6cd5\u306f\uff1f<\/h2>\n\n\n<p>\u66f8\u7c4d\u3084\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u5b66\u7fd2\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u6628\u4eca\u3067\u306f\u3001YouTube\u306a\u3069\u306e\u52d5\u753b\u30b5\u30a4\u30c8\u3084\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30a4\u30c8\u306a\u3069\u3082\u5145\u5b9f\u3057\u3066\u3044\u3066\u591a\u304f\u306e\u60c5\u5831\u304c\u624b\u306b\u5165\u308a\u307e\u3059\u3002<br \/>\u305d\u3057\u3066\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3059\u308b\u306b\u306f\u3001\u77e5\u8b58\u3092\u3064\u3051\u306a\u304c\u3089\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u307f\u308b\u306a\u3069\u3001\u30a4\u30f3\u30d7\u30c3\u30c8\u3068\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u7279\u306b\u72ec\u5b66\u306e\u5834\u5408\u306f\u3001\u6709\u8b58\u8005\u306b\u8cea\u554f\u304c\u3067\u304d\u305f\u308a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u74b0\u5883\u304c\u3042\u308b\u3068\u3001\u7406\u89e3\u5ea6\u304c\u6df1\u307e\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3060\u3001VBA\u306b\u9650\u3089\u305a\u3001IT\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u308b\u969b\u3001\u3069\u3046\u3057\u3066\u3082\u8ab2\u984c\u306b\u3076\u3064\u304b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u3088\u306d\u3002\u7279\u306b\u72ec\u5b66\u3060\u3068\u3001\u308f\u304b\u3089\u306a\u3044\u90e8\u5206\u3092\u30d7\u30ed\u306b\u8cea\u554f\u3067\u304d\u308b\u6a5f\u4f1a\u3092\u78ba\u4fdd\u3057\u306b\u304f\u304f\u3001\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304c\u7d9a\u304d\u306b\u304f\u3044\u3068\u3044\u3046\u5074\u9762\u304c\u3042\u308a\u307e\u3059\u3002\u72ec\u5b66\u3067\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u3092\u7dad\u6301\u3059\u308b\u81ea\u4fe1\u304c\u306a\u3044\u4eba\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3068\u3044\u3046\u624b\u3082\u3042\u308a\u307e\u3059\u3002\u8cbb\u7528\u306f\u639b\u304b\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5206\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u3084\u3059\u3044\u3067\u3059\u3002\u3057\u3063\u304b\u308a\u3068\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3057\u3066\u5b9f\u8df5\u306b\u6d3b\u304b\u3057\u305f\u3044\u3068\u3044\u3046\u4eba\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n<p><span class=\"markerYellow\"><strong>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u306a\u3089\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u304c\u304a\u3059\u3059\u3081\uff01<\/strong><\/span><\/p>\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/yuudou.png\" class=\"post-img\">\n\n\n<p>IT\u30b9\u30ad\u30eb\u9700\u8981\u306e\u9ad8\u307e\u308a\u3068\u3068\u3082\u306b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3082\u5897\u3048\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3069\u306e\u30b9\u30af\u30fc\u30eb\u306b\u901a\u3046\u3079\u304d\u304b\u8ff7\u3063\u3066\u3057\u307e\u3046\u4eba\u3082\u3044\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u3093\u306a\u65b9\u306b\u306f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff01\u3053\u308c\u307e\u3067\u591a\u304f\u306eIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u80b2\u6210\u30fb\u8f29\u51fa\u3057\u3066\u304d\u305f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3067\u3082\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3092\u958b\u8b1b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"bgBox\">\n<p><strong>\uff1c\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306e\u7279\u5fb4\uff1e<\/strong><br \/><strong>\u30fb\u305f\u3057\u304b\u306a\u80b2\u6210\u5b9f\u7e3e\u3068\u89aa\u8eab\u306a\u6559\u80b2\u3000\uff5e\u30bb\u30ab\u30f3\u30c9\u30ad\u30e3\u30ea\u30a2\u3092\u5168\u529b\u652f\u63f4\uff5e<\/strong><br \/><strong>\u30fb\u8b1b\u5e2b\u304c\u73fe\u5f79\u30a8\u30f3\u30b8\u30cb\u30a2\u3000\uff5e\u201c\u672c\u5f53\u201d\u306e\u958b\u767a\u30ce\u30a6\u30cf\u30a6\u3092\u76f4\u306b\u5b66\u3079\u308b\uff5e<\/strong><br \/><strong>\u30fb\u5c02\u5c5e\u8b1b\u5e2b\u304c\u5b66\u7fd2\u3092\u5fb9\u5e95\u30b5\u30dd\u30fc\u30c8\u3000\uff5e\u300c\u308f\u304b\u3089\u306a\u3044\u300d\u3092\u5fb9\u5e95\u89e3\u6c7a\uff5e<\/strong><br \/><strong>\u30fb\u5b9f\u52d9\u30d9\u30fc\u30b9\u3067\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3000\uff5e\u5b9f\u8df5\u7684\u306a\u51dd\u7e2e\u30ab\u30ea\u30ad\u30e5\u30e9\u30e0\uff5e<\/strong><\/p>\n<\/div>\n<p>\u3053\u306e\u3088\u3046\u306a\u7279\u5fb4\u3092\u6301\u3064\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u3068\u3057\u3066\u6700\u9069\u3067\u3059\u3002<br \/>\u8a71\u3092\u805e\u304d\u305f\u3044\u30fb\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u3068\u3044\u3046\u65b9\u306f<a href=\"https:\/\/techmania.jp\/lp\/2\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u304b\u3089\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"\u914d\u5217\uff08Array\uff09\u306f\u3001\u540c\u3058\u578b\u306e\u5024\u3092\u9023\u756a\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff09\u3067\u4e26\u3079\u3066\u683c\u7d0d\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002VBA\u3067\u306f\u4e00\u6b21\u5143\uff08\u30ea\u30b9\u30c8\uff09\u3084\u4e8c\u6b21\u5143\uff08\u8868\uff09\u3068\u3057\u3066\u6271\u3044\u3001\u6dfb\u5b57\u3067\u500b\u3005\u306e\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u3053\u3046\u3057\u305f\u6027\u8cea\u304b\u3089\u3001\u540c\u3058\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u5927\u91cf\u306b\u6271\u3046\u5834\u9762\u3067\u914d\u5217\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002 Excel\u3067\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u3066\u9806\u756a\u306b\u51e6\u7406\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c7\u30fc\u30bf\u3092VBA\u3067\u914d\u5217\u306b\u683c\u7d0d\u3057\u3066\u304b\u3089\u51e6\u7406\u3092\u8d70\u3089\u305b\u308b\u3053\u3068\u3067\u3001\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u7c21\u6f54\u306b\u51e6\u7406 [&hellip;]","protected":false},"author":12,"featured_media":8136,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/vba_array.png","fifu_image_alt":"\u3010Excel VBA\u3011\u914d\u5217\u306e\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u30fb\u4f7f\u7528\u65b9\u6cd5\u3092\u89e3\u8aac","footnotes":""},"categories":[1],"tags":[],"class_list":["post-8128","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/8128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/comments?post=8128"}],"version-history":[{"count":27,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/8128\/revisions"}],"predecessor-version":[{"id":10268,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/8128\/revisions\/10268"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media\/8136"}],"wp:attachment":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media?parent=8128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/categories?post=8128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/tags?post=8128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}