{"id":1838,"date":"2025-07-15T09:41:28","date_gmt":"2025-07-15T00:41:28","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1838"},"modified":"2026-01-15T09:41:44","modified_gmt":"2026-01-15T00:41:44","slug":"vba%e9%85%8d%e5%88%97%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e5%ae%8c%e5%85%a8%e3%82%ac%e3%82%a4%e3%83%89%ef%bd%9c%e9%ab%98%e9%80%9f%e5%8c%96%e3%81%ae%e4%bb%95%e7%b5%84%e3%81%bf%e3%81%a8%e3%82%a8","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1838\/","title":{"rendered":"VBA\u914d\u5217\u306e\u4f7f\u3044\u65b9\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u9ad8\u901f\u5316\u306e\u4ed5\u7d44\u307f\u3068\u30a8\u30e9\u30fc\u5bfe\u7b56\u307e\u3067"},"content":{"rendered":"<div>\n<h2>VBA\u914d\u5217\u306e\u4f7f\u3044\u65b9\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u304b\u3089\u9ad8\u901f\u5316\u3001\u30a8\u30e9\u30fc\u5bfe\u7b56\u307e\u3067<\/h2>\n<h3>\u5c0e\u5165<\/h3>\n<p>\n    \u300c<strong>Excel\u30de\u30af\u30ed<\/strong>\u306e\u51e6\u7406\u3001\u9045\u3059\u304e\u3066\u7126\u3063\u305f\u3053\u3068\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<br \/>\n    \u79c1\u305f\u3061\u3082\u73fe\u5834\u3067\u300e\u30bb\u30eb\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3060\u3088\u3002<strong>VBA\u306e\u914d\u5217<\/strong>\u3092\u4f7f\u3048\u3070\u4e00\u62ec\u51e6\u7406\u3067\u304d\u3066\u7206\u901f\u306b\u306a\u308b\u300f\u3068\u30a2\u30c9\u30d0\u30a4\u30b9\u3055\u308c\u308b\u5834\u9762\u3001\u3088\u304f\u3042\u308a\u307e\u3059\u3002\n  <\/p>\n<ul>\n<li><strong>\u305d\u3082\u305d\u3082VBA\u3067\u306e\u914d\u5217\u306e\u66f8\u304d\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u2026<\/strong><\/li>\n<li><strong>Python\u306e\u30ea\u30b9\u30c8\u3084Java\u306e\u914d\u5217\u3068\u4f55\u304c\u9055\u3046\u306e\uff1f<\/strong><\/li>\n<li><strong>\u672c\u5f53\u306b\u901f\u304f\u306a\u308b\u306e\uff1f\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u304c\u898b\u305f\u3044\uff01<\/strong><\/li>\n<\/ul>\n<p>\n    \u3053\u3093\u306a\u7591\u554f\u3084\u4e0d\u5b89\u3001\u8eab\u306b\u899a\u3048\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<br \/>\n    \u4eca\u56de\u306f\u300c\u914d\u5217\u3063\u3066\u4f55\uff1f\u300d\u300c\u3069\u3046\u4f7f\u3046\u306e\uff1f\u300d\u304b\u3089\u3001<strong>\u696d\u52d9\u3067\u5b9f\u969b\u306b\u56f0\u3063\u305f\u6642\u306b\u3059\u3050\u4f7f\u3048\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u30fb\u30cf\u30de\u308a\u30dd\u30a4\u30f3\u30c8\u306e\u89e3\u6c7a\u7b56<\/strong>\u307e\u3067\u3001\u73fe\u5834\u76ee\u7dda\u3067\u4e00\u7dd2\u306b\u6574\u7406\u3057\u307e\u3059\u3002\n  <\/p>\n<p>\n    \uff08Excel\u30de\u30af\u30ed\u306e\u5b9f\u8df5\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1747\/\" target=\"_blank\" rel=\"noopener\">SES\u73fe\u5834\u3067VBA\u3067\u304d\u307e\u3059\u304b\uff1f\u672a\u7d4c\u9a13\u5411\u3051Excel\u30de\u30af\u30ed\u5b9f\u8df5\u8853<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aExcel\u30de\u30af\u30ed<\/strong><br \/>\n      Excel\u306e\u64cd\u4f5c\u3092\u81ea\u52d5\u5316\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3002VBA\uff08Visual Basic for Applications\uff09\u3067\u8a18\u8ff0\u3057\u3001\u7e70\u308a\u8fd4\u3057\u4f5c\u696d\u3084\u5927\u91cf\u30c7\u30fc\u30bf\u51e6\u7406\u3092\u52b9\u7387\u5316\u3067\u304d\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aVBA\uff08Visual Basic for Applications\uff09<\/strong><br \/>\n      Microsoft Office\u88fd\u54c1\u3067\u4f7f\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3002Excel\u3084Access\u306a\u3069\u306e\u64cd\u4f5c\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u914d\u5217<\/strong><br \/>\n      \u8907\u6570\u306e\u5024\u3092\u307e\u3068\u3081\u3066\u7ba1\u7406\u3067\u304d\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3002Excel\u30de\u30af\u30ed\u3067\u306f\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u4e00\u62ec\u51e6\u7406\u306b\u6d3b\u7528\u3055\u308c\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPython\u306e\u30ea\u30b9\u30c8\uff0fJava\u306e\u914d\u5217<\/strong><br \/>\n      Python\u306e\u30ea\u30b9\u30c8\u306f\u53ef\u5909\u9577\u3067\u578b\u6df7\u5728\u53ef\u3001Java\u306e\u914d\u5217\u306f\u56fa\u5b9a\u9577\u3067\u578b\u6307\u5b9a\u5fc5\u9808\u3002VBA\u914d\u5217\u306f\u5ba3\u8a00\u3084\u62e1\u5f35\u65b9\u6cd5\u304c\u7570\u306a\u308b\u306e\u3067\u6ce8\u610f\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>\u306a\u305cVBA\u914d\u5217\u3067\u201c\u7206\u901f\u201d\u306b\u306a\u308b\uff1f\u4ed5\u7d44\u307f\u3092\u56f3\u89e3\u3067\u7406\u89e3<\/h2>\n<p>\n    <strong>\u306a\u305c\u914d\u5217\u3092\u4f7f\u3046\u3068\u901f\u304f\u306a\u308b\u306e\uff1f<\/strong><br \/>\n    \u5b9f\u306f<strong>\u30bb\u30eb\u5358\u4f4d\u30a2\u30af\u30bb\u30b9<\/strong>\u306f\u3001\u5009\u5eab\uff08Excel\u30b7\u30fc\u30c8\uff09\u3068\u4f5c\u696d\u5834\uff08VBA\uff09\u306e\u9593\u3092\u6bce\u56de\u5f80\u5fa9\u3057\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u3002\u5f80\u5fa9\uff08\u901a\u4fe1\uff09\u304c\u591a\u3044\u307b\u3069\u9045\u304f\u306a\u308a\u307e\u3059\u3002\n  <\/p>\n<p>\u4e00\u65b9\u3001<strong>\u914d\u5217<\/strong>\u3092\u4f7f\u3048\u3070\u300c\u307e\u3068\u3081\u3066\u7bb1\u8a70\u3081\u300d\u3057\u3066\u4e00\u6c17\u306b\u4f5c\u696d\u5834\uff08\u30e1\u30e2\u30ea\uff09\u3067\u51e6\u7406\u3057\u3001\u7d42\u308f\u3063\u305f\u3089\u4e00\u62ec\u3067\u623b\u3059\u3060\u3051\u3002\u901a\u4fe1\u30b3\u30b9\u30c8\u304c\u5287\u7684\u306b\u6e1b\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\u30bb\u30eb\u500b\u5225\u30a2\u30af\u30bb\u30b9<\/strong>\uff1aVBA \u2192 \u30bb\u30ebA1 \u2192 VBA \u2192 \u30bb\u30ebA2 \u2192 &#8230; \uff08\u6bce\u56de\u901a\u4fe1\uff09<\/li>\n<li><strong>\u914d\u5217\u3067\u4e00\u62ec\u51e6\u7406<\/strong>\uff1aVBA \u2192 \u5168\u30bb\u30eb\u3092\u4e00\u62ec\u8aad\u8fbc \u2192 \u30e1\u30e2\u30ea\u51e6\u7406 \u2192 \u4e00\u62ec\u66f8\u8fbc\uff08\u305f\u3063\u305f2\u56de\u306e\u901a\u4fe1\uff09<\/li>\n<\/ul>\n<p><strong>\u30dd\u30a4\u30f3\u30c8\u306f\u300cExcel\u3068\u3084\u308a\u3068\u308a\u3059\u308b\u56de\u6570\u3092\u6975\u9650\u307e\u3067\u6e1b\u3089\u3059\u3053\u3068\u300d<\/strong>\u3002\u3053\u308c\u304c\u914d\u5217\u306b\u3088\u308b\u9ad8\u901f\u5316\u306e\u672c\u8cea\u3067\u3059\u3002<\/p>\n<p>\n    \uff08VBA\u00d7AI\u306b\u3088\u308bExcel\u9ad8\u901f\u5316\u30fbCSV\u5909\u63db\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1699\/\" target=\"_blank\" rel=\"noopener\">VBA\u00d7AI\u3067Excel\u30b7\u30fc\u30c8\u60c5\u5831\u4f1d\u9054\u738798%\uff01CSV\u5909\u63db\u30fb\u30ef\u30a4\u30e4\u30fc\u30d5\u30ec\u30fc\u30e0\u51fa\u529b\u306e\u5168\u624b\u9806<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30bb\u30eb\u5358\u4f4d\u30a2\u30af\u30bb\u30b9<\/strong><br \/>\n      Excel\u306e\u5404\u30bb\u30eb\u306b1\u3064\u305a\u3064\u30a2\u30af\u30bb\u30b9\u3057\u3066\u5024\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3002\u5927\u91cf\u30c7\u30fc\u30bf\u3067\u306f\u51e6\u7406\u304c\u9045\u304f\u306a\u308a\u3084\u3059\u3044\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30e1\u30e2\u30ea\u51e6\u7406<\/strong><br \/>\n      \u4e00\u5ea6\u306b\u30c7\u30fc\u30bf\u3092\u914d\u5217\u3068\u3057\u3066\u30e1\u30e2\u30ea\u4e0a\u306b\u8aad\u307f\u8fbc\u307f\u3001\u307e\u3068\u3081\u3066\u8a08\u7b97\u30fb\u7de8\u96c6\u3059\u308b\u65b9\u6cd5\u3002Excel\u3068\u306e\u3084\u308a\u3068\u308a\u56de\u6570\u304c\u6e1b\u308a\u9ad8\u901f\u5316\u3067\u304d\u308b\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>\u30b3\u30d4\u30da\u3067\u5b66\u3076\uff01VBA\u914d\u5217\u306e\u57fa\u672c\u64cd\u4f5c\uff08\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u30fb\u30eb\u30fc\u30d7\uff09<\/h2>\n<p>\u914d\u5217\u306f<strong>\u9759\u7684\u914d\u5217<\/strong>\u3068<strong>\u52d5\u7684\u914d\u5217<\/strong>\u306e2\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002\u5b9f\u969b\u306e\u4f7f\u3044\u5206\u3051\u3068\u6ce8\u610f\u70b9\u3001\u73fe\u5834\u306e\u201c\u3042\u308b\u3042\u308b\u201d\u3082\u4ea4\u3048\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u9759\u7684\u914d\u5217<\/strong><br \/>\n      \u5ba3\u8a00\u6642\u306b\u8981\u7d20\u6570\uff08\u30b5\u30a4\u30ba\uff09\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\u914d\u5217\u3002\u9014\u4e2d\u3067\u30b5\u30a4\u30ba\u5909\u66f4\u306f\u3067\u304d\u306a\u3044\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u52d5\u7684\u914d\u5217<\/strong><br \/>\n      \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30b5\u30a4\u30ba\u3092\u5909\u66f4\u3067\u304d\u308b\u914d\u5217\u3002<code>ReDim<\/code>\u3067\u62e1\u5f35\u30fb\u7e2e\u5c0f\u304c\u53ef\u80fd\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aVariant\u578b<\/strong><br \/>\n      VBA\u3067\u6700\u3082\u67d4\u8edf\u306a\u578b\u3002\u6570\u5024\u30fb\u6587\u5b57\u5217\u30fb\u914d\u5217\u306a\u3069\u4f55\u3067\u3082\u683c\u7d0d\u3067\u304d\u308b\u3002\u30bb\u30eb\u7bc4\u56f2\u306e\u4e00\u62ec\u8aad\u8fbc\u306b\u3082\u4f7f\u308f\u308c\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aLBound\uff0fUBound<\/strong><br \/>\n      \u914d\u5217\u306e\u6700\u5c0f\uff08LBound\uff09\u30fb\u6700\u5927\uff08UBound\uff09\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d6\u5f97\u3059\u308b\u95a2\u6570\u3002\u30eb\u30fc\u30d7\u51e6\u7406\u306e\u5b89\u5168\u8a2d\u8a08\u306b\u5fc5\u9808\u3002\n    <\/p>\n<\/blockquote>\n<h3>\u9759\u7684\u914d\u5217\uff1a\u8981\u7d20\u6570\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\u5834\u5408<\/h3>\n<pre><code>' Option Base 1 '\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5148\u982d\u30671\u59cb\u307e\u308a\u306b\u3067\u304d\u308b\r\nSub StaticArrayExample()\r\n    ' \u8981\u7d20\u65703\u306eString\u578b\u914d\u5217\uff08\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f0,1,2\uff09\r\n    Dim names(2) As String\r\n    names(0) = \"\u4f50\u85e4\"\r\n    names(1) = \"\u9234\u6728\"\r\n    names(2) = \"\u9ad8\u6a4b\"\r\n    For i = LBound(names) To UBound(names)\r\n        Debug.Print names(i)\r\n    Next i\r\n    ' Array\u95a2\u6570\u306e\u7701\u7565\u4f8b\r\n    Dim fruits As Variant\r\n    fruits = Array(\"\u308a\u3093\u3054\", \"\u30d0\u30ca\u30ca\", \"\u307f\u304b\u3093\")\r\n    Debug.Print fruits(0)\r\nEnd Sub\r\n<\/code><\/pre>\n<p>\n    <strong>Python\/Java\u7d4c\u9a13\u8005\u5411\u3051\u6ce8\u8a18\uff1a<\/strong><br \/>\n    VBA\u306e\u914d\u5217\u306f\u30c7\u30d5\u30a9\u30eb\u30c80\u59cb\u307e\u308a\u3002<strong>Option Base 1<\/strong>\u30671\u59cb\u307e\u308a\u306b\u5909\u66f4\u53ef\u80fd\u3002\u305f\u3060\u3057\u4f8b\u5916\u3082\u3042\u308b\u306e\u3067\u3001<strong>LBound<\/strong>\/<strong>UBound<\/strong>\u3092\u4f7f\u3063\u305f\u30eb\u30fc\u30d7\u304c\u5b89\u5168\u3067\u3059\u3002\n  <\/p>\n<h3>\u52d5\u7684\u914d\u5217\uff1a\u9014\u4e2d\u3067\u8981\u7d20\u6570\u3092\u5909\u3048\u305f\u3044\u5834\u5408<\/h3>\n<pre><code>Sub DynamicArrayExample()\r\n    Dim scores() As Long\r\n    ReDim scores(2)\r\n    scores(0) = 80: scores(1) = 95: scores(2) = 72\r\n    ReDim Preserve scores(4)\r\n    scores(3) = 100: scores(4) = 88\r\n    For Each score In scores\r\n        Debug.Print score\r\n    Next score\r\nEnd Sub\r\n<\/code><\/pre>\n<ul>\n<li><strong>ReDim Preserve<\/strong>\u3067\u30b5\u30a4\u30ba\u62e1\u5f35\u53ef\u80fd\u3002\u305f\u3060\u3057\u3001\u4f55\u5ea6\u3082\u62e1\u5f35\u3059\u308b\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u4f4e\u4e0b\u306b\u6ce8\u610f\u3002<\/li>\n<\/ul>\n<h3>\u591a\u6b21\u5143\u914d\u5217\uff1a\u884c\u00d7\u5217\u306e\u8868\u5f62\u5f0f<\/h3>\n<pre><code>Sub MultiDimArrayExample()\r\n    Dim matrix(2, 1) As String\r\n    matrix(0, 0) = \"\u5546\u54c1A\": matrix(0, 1) = \"100\u5186\"\r\n    matrix(1, 0) = \"\u5546\u54c1B\": matrix(1, 1) = \"200\u5186\"\r\n    matrix(2, 0) = \"\u5546\u54c1C\": matrix(2, 1) = \"150\u5186\"\r\n    Debug.Print matrix(1, 0) & \"\u306e\u4fa1\u683c\u306f\" & matrix(1, 1)\r\nEnd Sub\r\n<\/code><\/pre>\n<hr \/>\n<h2>\u5b9f\u8df5\uff01\u30bb\u30eb\u7bc4\u56f2\u3068\u914d\u5217\u3067\u201c\u7206\u901f\u201d\u4e00\u62ec\u51e6\u7406<\/h2>\n<p>\n    <strong>1\u30bb\u30eb\u305a\u3064\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30b3\u30fc\u30c9\u3001\u9045\u3059\u304e\u3066\u5b9f\u7528\u306b\u306a\u3089\u306a\u3044\u2026<\/strong><br \/>\n    \u305d\u3046\u611f\u3058\u305f\u3089\u3001<strong>\u914d\u5217\u306e\u201c\u7206\u901f\u5316\u30d1\u30bf\u30fc\u30f3\u201d<\/strong>\u3092\u8a66\u3057\u307e\u3057\u3087\u3046\u3002\n  <\/p>\n<h3>Before\uff08\u9045\u3044\uff09<\/h3>\n<pre><code>Sub SlowProcess()\r\n    For i = 1 To 100000\r\n        Sheet1.Cells(i, \"B\").Value = Sheet1.Cells(i, \"A\").Value * 2\r\n    Next i\r\nEnd Sub\r\n<\/code><\/pre>\n<h3>After\uff08\u901f\u3044\uff01\uff09<\/h3>\n<pre><code>Sub FastProcess()\r\n    Dim data As Variant\r\n    data = Sheet1.Range(\"A1:B100000\").Value\r\n    For i = 1 To UBound(data, 1)\r\n        data(i, 2) = data(i, 1) * 2\r\n    Next i\r\n    Sheet1.Range(\"A1:B100000\").Value = data\r\nEnd Sub\r\n<\/code><\/pre>\n<p>\n    <strong>\u3053\u306e\u9ec4\u91d1\u30d1\u30bf\u30fc\u30f3\u3092\u899a\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><br \/>\n    \u300c\u2460\u4e00\u62ec\u8aad\u8fbc \u2192 \u2461\u30e1\u30e2\u30ea\u51e6\u7406 \u2192 \u2462\u4e00\u62ec\u66f8\u8fbc\u300d\u3060\u3051\u3067<strong>100\u500d\u901f\u304f\u306a\u308b<\/strong>\u3053\u3068\u3082\u3002\n  <\/p>\n<hr \/>\n<h2>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30a8\u30e9\u30fc\u5bfe\u7b56\uff1a5\u3064\u306e\u201c\u843d\u3068\u3057\u7a74\u201d\u3068\u5b89\u5168\u8a2d\u8a08<\/h2>\n<p>\n    \u300e<strong>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6709\u52b9\u7bc4\u56f2\u306b\u3042\u308a\u307e\u305b\u3093<\/strong>\u300f<br \/>\n    \u539f\u56e0\u306f\u5927\u304d\u304f5\u3064\u3002\u73fe\u5834\u3067\u3088\u304f\u3042\u308b\u5931\u6557\u30d1\u30bf\u30fc\u30f3\u3068\u5bfe\u7b56\u30b3\u30fc\u30c9\u3092\u30bb\u30c3\u30c8\u3067\u6574\u7406\u3057\u307e\u3059\u3002\n  <\/p>\n<h3>1. \u52d5\u7684\u914d\u5217\u3067<code>ReDim<\/code>\u3057\u5fd8\u308c<\/h3>\n<pre><code>Dim arr() As String\r\narr(0) = \"test\" '\u2192 \u30a8\u30e9\u30fc\uff01\r\n<\/code><\/pre>\n<p>\u2192 <strong>\u4e8b\u524d\u306b\u30b5\u30a4\u30ba\u3092\u6307\u5b9a<\/strong><\/p>\n<pre><code>ReDim arr(0)\r\narr(0) = \"test\"\r\n<\/code><\/pre>\n<h3>2. \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u958b\u59cb\u756a\u53f7\u52d8\u9055\u3044<\/h3>\n<ul>\n<li><strong>Option Base 1\u6642\u306b0\u756a\u76ee\u3078\u30a2\u30af\u30bb\u30b9\u3001\u7b49<\/strong><\/li>\n<\/ul>\n<h3>3. \u30eb\u30fc\u30d7\u56de\u6570\u56fa\u5b9a\u306b\u3088\u308b\u7bc4\u56f2\u8d85\u904e<\/h3>\n<ul>\n<li><strong>For i = 0 To 10\u3067\u306f\u306a\u304f\u3001LBound\/UBound\u3067\u7ba1\u7406<\/strong><\/li>\n<\/ul>\n<h3>4. \u30bb\u30eb\u7bc4\u56f2\u914d\u5217\u306f\u300c1\u59cb\u307e\u308a\u300d\u56fa\u5b9a<\/h3>\n<pre><code>Dim data As Variant\r\ndata = Range(\"A1:A10\").Value\r\nDebug.Print data(1, 1) '\u25ce\r\n<\/code><\/pre>\n<h3>5. <code>Split<\/code>\u95a2\u6570\u306f\u300c0\u59cb\u307e\u308a\u300d\u56fa\u5b9a<\/h3>\n<pre><code>arr = Split(text, \",\")\r\nDebug.Print arr(UBound(arr)) '\u25ce\r\n<\/code><\/pre>\n<p>\n    <strong>\u307e\u3068\u3081\uff1a<\/strong><br \/>\n    <strong>\u914d\u5217\u306e\u958b\u59cb\u756a\u53f7\u306f\u51e6\u7406\u3054\u3068\u306b\u9055\u3046\uff01\u5fc5\u305a<code>LBound<\/code>\/<code>UBound<\/code>\u3067\u30eb\u30fc\u30d7\u305b\u3088<\/strong><br \/>\n    \u3053\u306e\u7fd2\u6163\u304c\u30d0\u30b0\u3068\u624b\u623b\u308a\u3092\u6e1b\u3089\u3057\u307e\u3059\u3002\n  <\/p>\n<hr \/>\n<h2>\u914d\u5217 vs Dictionary\uff5c\u3069\u3046\u4f7f\u3044\u5206\u3051\u308b\uff1f<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u7279\u5fb4<\/th>\n<th>\u914d\u5217 (Array)<\/th>\n<th>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u30a2\u30af\u30bb\u30b9\u65b9\u6cd5<\/td>\n<td>\u6570\u5024\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/td>\n<td>\u4efb\u610f\u306e\u30ad\u30fc<\/td>\n<\/tr>\n<tr>\n<td>\u691c\u7d22\u6027<\/td>\n<td>\u9045\u3044\uff08\u30eb\u30fc\u30d7\u304c\u5fc5\u8981\uff09<\/td>\n<td>\u975e\u5e38\u306b\u901f\u3044\uff08\u30ad\u30fc\u5373\u53d6\u5f97\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/td>\n<td>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6307\u5b9a\u306f\u6700\u901f<\/td>\n<td>\u308f\u305a\u304b\u306b\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9<\/td>\n<\/tr>\n<tr>\n<td>\u4e3b\u306a\u7528\u9014<\/td>\n<td>\u884c\u5217\u8a08\u7b97\u3001\u4e00\u62ec\u51e6\u7406<\/td>\n<td>\u30e6\u30cb\u30fc\u30af\u30c7\u30fc\u30bf\u7ba1\u7406\u30fb\u691c\u7d22<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <strong>\u4f7f\u3044\u5206\u3051\u76ee\u5b89\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\u914d\u5217<\/strong>\uff1d\u9806\u6b21\u51e6\u7406\u30fb\u4e00\u62ec\u8a08\u7b97<\/li>\n<li><strong>Dictionary<\/strong>\uff1d\u30ad\u30fc\u4ed8\u7ba1\u7406\u30fb\u91cd\u8907\u6392\u9664<\/li>\n<\/ul>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><br \/>\n      VBA\u3067\u4f7f\u3048\u308b\u9023\u60f3\u914d\u5217\u3002\u4efb\u610f\u306e\u30ad\u30fc\uff08\u6587\u5b57\u5217\u3084\u6570\u5024\uff09\u3067\u5024\u3092\u7ba1\u7406\u3067\u304d\u3001\u691c\u7d22\u3084\u91cd\u8907\u6392\u9664\u306b\u4fbf\u5229\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/strong><br \/>\n      \u914d\u5217\u306e\u5404\u8981\u7d20\u3092\u8b58\u5225\u3059\u308b\u756a\u53f7\u30020\u59cb\u307e\u308a\u30fb1\u59cb\u307e\u308a\u306a\u3069\u8a00\u8a9e\u3084\u8a2d\u5b9a\u3067\u7570\u306a\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30ad\u30fc<\/strong><br \/>\n      Dictionary\u3067\u5024\u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u306e\u8b58\u5225\u5b50\u3002\u91cd\u8907\u4e0d\u53ef\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>FAQ\uff1a\u3088\u304f\u3042\u308b\u7591\u554f\u30fb\u5b9f\u52d9Tips<\/h2>\n<ul>\n<li>\n      <strong>Q. VBA\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f0\u59cb\u307e\u308a\uff1f1\u59cb\u307e\u308a\uff1f<\/strong><br \/>\n      <strong>A.<\/strong> \u30c7\u30d5\u30a9\u30eb\u30c8\u306f0\u59cb\u307e\u308a\u3002\u305f\u3060\u3057<strong>Option Base 1<\/strong>\u30671\u59cb\u307e\u308a\u306b\u5909\u66f4\u53ef\u3002<br \/>\n      \u305f\u3060\u3057<strong>Split<\/strong>\u3084\u30bb\u30eb\u7bc4\u56f2\u914d\u5217\u306f\u4f8b\u5916\u306a\u306e\u3067\u3001\u5fc5\u305a<strong>LBound<\/strong>\/<strong>UBound<\/strong>\u3067\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n    <\/li>\n<li>\n      <strong>Q. \u914d\u5217\u306e\u4e2d\u8eab\u3092\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u306b\u306f\uff1f<\/strong><br \/>\n      <strong>A.<\/strong> <strong>VBE\u306e\u300c\u30ed\u30fc\u30ab\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u300d<\/strong>\u3067\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u5f8c\u306b\u5c55\u958b\u78ba\u8a8d\u304c\u4fbf\u5229\u3067\u3059\u3002\n    <\/li>\n<li>\n      <strong>Q. <strong>For Each<\/strong>\u3068<strong>For i = &#8230;<\/strong>\u306e\u4f7f\u3044\u5206\u3051\u306f\uff1f<\/strong><br \/>\n      <strong>A.<\/strong> <strong>\u5024\u306e\u5909\u66f4\u304c\u5fc5\u8981\u2192<strong>For i<\/strong><\/strong\n      >\u3002\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306a\u3089<strong>For Each<\/strong>\u3067OK\u3067\u3059\u3002\n    <\/li>\n<li>\n      <strong>Q. \u914d\u5217\u306b\u683c\u7d0d\u3067\u304d\u308b\u578b\u306f\uff1f<\/strong><br \/>\n      <strong>A.<\/strong> <strong>\u578b\u5ba3\u8a00\u3067\u5236\u9650\u53ef<\/strong>\u3002<strong>Variant<\/strong>\u914d\u5217\u306a\u3089\u4f55\u3067\u3082\u5165\u308a\u307e\u3059\u3002\u30bb\u30eb\u7bc4\u56f2\u4e00\u62ec\u8aad\u8fbc\u3082<strong>Variant<\/strong>\u578b\u3002\n    <\/li>\n<li>\n      <strong>Q. <strong>ReDim<\/strong>\u3067\u591a\u6b21\u5143\u914d\u5217\u3092\u62e1\u5f35\u3067\u304d\u308b\uff1f<\/strong><br \/>\n      <strong>A.<\/strong> <strong>\u6700\u5f8c\u306e\u6b21\u5143\u306e\u307f\u53ef\u80fd<\/strong>\u3002\u6700\u521d\u306e\u6b21\u5143\u5909\u66f4\u306f\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u3002\n    <\/li>\n<\/ul>\n<p>\u305c\u3072\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\u3057\u3066\u3001\u307e\u305a\u306f\u52d5\u304b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n","protected":false},"featured_media":1839,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1838"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/1839"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}