{"id":1840,"date":"2025-06-15T10:22:12","date_gmt":"2025-06-15T01:22:12","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1840"},"modified":"2026-01-15T10:22:37","modified_gmt":"2026-01-15T01:22:37","slug":"vba-range%e3%81%a8cells%e3%81%ae%e4%bd%bf%e3%81%84%e5%88%86%e3%81%91%e5%88%a4%e6%96%ad%e3%83%9e%e3%83%83%e3%83%97%ef%bd%9c%e9%85%8d%e5%88%97%e3%81%a750ms%e9%ab%98%e9%80%9f%e5%8c%96","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1840\/","title":{"rendered":"VBA Range\u3068Cells\u306e\u4f7f\u3044\u5206\u3051\u5224\u65ad\u30de\u30c3\u30d7\uff5c\u914d\u5217\u306750ms\u9ad8\u901f\u5316"},"content":{"rendered":"<div>\n<h2>VBA\u306eRange\u3068Cells\u4f7f\u3044\u5206\u3051\u5b8c\u5168\u30ac\u30a4\u30c9\uff5c\u57fa\u672c\u304b\u3089\u9ad8\u901f\u5316\u3001\u30a8\u30e9\u30fc&#8217;1004&#8217;\u5bfe\u7b56\u307e\u3067<\/h2>\n<h3>\u5c0e\u5165<\/h3>\n<p>\n    \u300c<strong>VBA\u3067For\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066\u30bb\u30eb\u3092\u4e00\u3064\u305a\u3064\u66f4\u65b0\u3057\u305f\u3089\u3001\u51e6\u7406\u304c\u9045\u3059\u304e\u3066Excel\u304c\u56fa\u307e\u3063\u3066\u3057\u307e\u3063\u305f\u2026<\/strong>\u300d<br \/>\n    \u300c<strong>Range\u3068Cells\u3001\u7d50\u5c40\u3069\u3063\u3061\u3092\u4f7f\u3048\u3070\u3044\u3044\u306e\u304b\u5206\u304b\u3089\u305a\u3001\u30b3\u30fc\u30c9\u304c\u3050\u3061\u3083\u3050\u3061\u3083\u2026<\/strong>\u300d \u300c<strong>\u30cd\u30c3\u30c8\u3067\u898b\u3064\u3051\u305f\u30b3\u30fc\u30c9\u3092\u8a66\u3059\u3068\u3001\u6c7a\u307e\u3063\u3066\u300e\u5b9f\u884c\u6642\u30a8\u30e9\u30fc &#8216;1004&#8217;\u300f\u304c\u51fa\u3066\u5148\u306b\u9032\u3081\u306a\u3044\u2026<\/strong>\u300d\n  <\/p>\n<p>\n    \u3053\u3046\u3057\u305f\u60a9\u307f\u3001<strong>\u79c1\u305f\u3061\u73fe\u5834\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u306a\u3089\u4e00\u5ea6\u306f\u4f53\u9a13<\/strong>\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n    \u300c\u7126\u3063\u305f\u300d\u300c\u30cf\u30de\u3063\u305f\u300d\u3068\u304d\u3001\u4f55\u304c\u8d77\u304d\u3066\u3044\u308b\u306e\u304b\u2015\u2015\u305d\u306e\u201c\u30e2\u30e4\u30e2\u30e4\u201d\u3092\u4e00\u7dd2\u306b\u89e3\u6d88\u3057\u307e\u3057\u3087\u3046\u3002\n  <\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f<strong>\u30bb\u30eb\u306e\u6271\u3044<\/strong>\u3001\u7279\u306b<strong>Range<\/strong>\u3068<strong>Cells<\/strong>\u306e\u7279\u6027\u3092\u300c\u73fe\u5834\u611f\u899a\u300d\u3067\u5fb9\u5e95\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\n    \uff08VBA\u914d\u5217\u306e\u9ad8\u901f\u5316\u3084\u30a8\u30e9\u30fc\u5bfe\u7b56\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1838\/\" target=\"_blank\" rel=\"noopener\">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<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<ul>\n<li><strong>\u306a\u305c\u30bb\u30eb\u3078\u306e\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u304c\u9045\u3044\u306e\u304b<\/strong>\uff08\u539f\u56e0\u3092\u201c\u898b\u3048\u308b\u5316\u201d\uff09<\/li>\n<li><strong>Range\u00d7\u914d\u5217\u3067\u5287\u7684\u306b\u9ad8\u901f\u5316\u3059\u308b\u65b9\u6cd5<\/strong>\uff08\u7406\u7531\u3082\u8179\u843d\u3061\uff09<\/li>\n<li><strong>\u30a8\u30e9\u30fc&#8217;1004&#8217;\u306e\u5b8c\u5168\u653b\u7565\u6cd5<\/strong>\uff08\u3088\u304f\u3042\u308b\u30df\u30b9\u3092\u518d\u73fe\u4ed8\u304d\u3067\uff09<\/li>\n<\/ul>\n<p>\n    \u8c4a\u5bcc\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067<strong>\u201c\u30b3\u30d4\u30da\u3057\u3066\u3059\u3050\u52d5\u304b\u305b\u308b\u201d<\/strong>\u30ec\u30d9\u30eb\u307e\u3067\u5206\u89e3\u3002<br \/>\n    \u4eca\u65e5\u304b\u3089\u5b9f\u88c5\u306b\u81ea\u4fe1\u304c\u6301\u3066\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\n  <\/p>\n<hr \/>\n<h2>\u7d50\u8ad6\u30d5\u30a1\u30fc\u30b9\u30c8\uff01Range\u3068Cells\u306e\u4f7f\u3044\u5206\u3051\u30de\u30c3\u30d7<\/h2>\n<p>\u307e\u305a\u7d50\u8ad6\u304b\u3089\u2015\u2015\u300c<strong>\u3069\u3063\u3061\u3092\u3069\u3046\u4f7f\u3046\uff1f<\/strong>\u300d\u306b\u5373\u7b54\u3057\u307e\u3059\u3002<\/p>\n<p>\n    <strong>\u57fa\u672c\u306f<strong>Cells<\/strong>\u3001\u7bc4\u56f2\u6307\u5b9a\u306f<strong>Range<\/strong>\u3001\u9ad8\u901f\u5316\u306e\u9b3c\u306f\u300eRange \u00d7 \u914d\u5217\u300f\u3002<\/strong>\n  <\/p>\n<table>\n<thead>\n<tr>\n<th>\u3084\u308a\u305f\u3044\u3053\u3068<\/th>\n<th>\u63a8\u5968<\/th>\n<th>\u7406\u7531<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1\u3064\u306e\u30bb\u30eb\u3092\u5909\u6570\uff08\u30eb\u30fc\u30d7\u7b49\uff09\u3067\u52d5\u7684\u306b\u6271\u3044\u305f\u3044<\/td>\n<td><strong>Cells<\/strong><\/td>\n<td>\u884c\u30fb\u5217\u3092\u6570\u5024\u6307\u5b9a\u3067\u304d\u3001\u30eb\u30fc\u30d7\u5909\u6570\u3068\u76f8\u6027\u304c\u629c\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u7279\u5b9a\u306e\u30bb\u30eb\u3084\u6c7a\u307e\u3063\u305f\u7bc4\u56f2\u3092\u56fa\u5b9a\u3067\u6307\u5b9a\u3057\u305f\u3044<\/td>\n<td><strong>Range<\/strong><\/td>\n<td><strong>&#8220;A1&#8221;<\/strong>\u306a\u3069\u898b\u305f\u76ee\u304c\u5206\u304b\u308a\u3084\u3059\u3044<\/td>\n<\/tr>\n<tr>\n<td>\u5927\u91cf\u306e\u30bb\u30eb\u3092\u9ad8\u901f\u306b\u8aad\u307f\u66f8\u304d\u3057\u305f\u3044<\/td>\n<td><strong>Range \u00d7 \u914d\u5217<\/strong><\/td>\n<td>Excel\u3068\u306e\u901a\u4fe1\u56de\u6570\u3092\u6e1b\u3089\u305b\u3066\u5287\u7684\u306b\u9ad8\u901f\u5316<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u306e\u5224\u65ad\u30de\u30c3\u30d7\u3092\u201c\u8179\u306b\u843d\u3068\u3057\u3066\u201d\u304a\u3051\u3070\u3001\u8ff7\u3044\u307e\u305b\u3093\u3002<\/p>\n<hr \/>\n<h2>1. Cells\u3068Range\u306e\u57fa\u672c\u69cb\u6587\u3068\u9055\u3044<\/h2>\n<h3>Cells\u30d7\u30ed\u30d1\u30c6\u30a3\uff08\u884c\u30fb\u5217\u756a\u53f7\u3067\u52d5\u7684\u6307\u5b9a\uff09<\/h3>\n<p>\u4f8b\u3048\u3070\u3001<strong>\u30eb\u30fc\u30d7\u51e6\u7406\u3067\u30bb\u30eb\u306b\u9023\u756a\u3092\u66f8\u304d\u8fbc\u307f\u305f\u3044<\/strong>\u6642\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aCells<\/strong><br \/>\n      Excel\u30b7\u30fc\u30c8\u4e0a\u306e\u30bb\u30eb\u3092\u300c\u884c\u756a\u53f7\u30fb\u5217\u756a\u53f7\u300d\u3067\u52d5\u7684\u306b\u6307\u5b9a\u3067\u304d\u308bVBA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002\u30eb\u30fc\u30d7\u51e6\u7406\u3084\u5909\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u67d4\u8edf\u306b\u30bb\u30eb\u64cd\u4f5c\u304c\u53ef\u80fd\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>' 3\u884c\u76ee\u30fb2\u5217\u76ee\uff08B3\u30bb\u30eb\uff09\u306b \"Hello\" \u3092\u5165\u529b\r\nCells(3, 2).Value = \"Hello\"\r\n\r\n' B\u52171\u884c\u76ee\u301c5\u884c\u76ee\u306b\u9023\u756a\u3092\u5165\u529b\r\nFor i = 1 To 5\r\n    Cells(i, 2).Value = i\r\nNext i\r\n<\/code><\/pre>\n<p><strong>\u30dd\u30a4\u30f3\u30c8\uff1a<\/strong>\u884c\u30fb\u5217\u756a\u53f7\u3092\u76f4\u63a5\u4f7f\u3046\u3053\u3068\u3067\u201c\u5909\u6570\u201d\u3068\u306e\u89aa\u548c\u6027\u304c\u9ad8\u304f\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u3051\u307e\u3059\u3002<\/p>\n<hr \/>\n<h3>Range\u30d7\u30ed\u30d1\u30c6\u30a3\uff08A1\u8a18\u6cd5\u30fb\u8907\u6570\u30bb\u30eb\u3082OK\uff09<\/h3>\n<pre><code>' A1\u30bb\u30eb\u306b\"Apple\"\u3092\u5165\u529b\r\nRange(\"A1\").Value = \"Apple\"\r\n\r\n' A1:C5\u306e\u7bc4\u56f2\u3092\u9ec4\u8272\u306b\r\nRange(\"A1:C5\").Interior.Color = vbYellow\r\n\r\n' Cells\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u52d5\u7684\u7bc4\u56f2\u3082\u6307\u5b9a\u53ef\u80fd\r\nRange(Cells(1, \"A\"), Cells(10, \"C\")).Font.Bold = True\r\n<\/code><\/pre>\n<p>\n    <strong>\u5f37\u307f\uff1a<\/strong>\n  <\/p>\n<ul>\n<li>\u3069\u306e\u30bb\u30eb\u304b<strong>\u76f4\u611f\u7684\u306b\u5206\u304b\u308b<\/strong><\/li>\n<li><strong>\u8907\u6570\u7bc4\u56f2\u3084\u540d\u524d\u4ed8\u304d\u7bc4\u56f2<\/strong>\u3082\u7c21\u5358\u306b\u6307\u5b9a\u3067\u304d\u308b<\/li>\n<\/ul>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aRange<\/strong><br \/>\n      Excel\u306e\u30bb\u30eb\u3084\u30bb\u30eb\u7bc4\u56f2\u3092\u300cA1\u300d\u306a\u3069\u306e\u30a2\u30c9\u30ec\u30b9\u8868\u8a18\u3084\u540d\u524d\u3067\u6307\u5b9a\u3067\u304d\u308bVBA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002\u8907\u6570\u30bb\u30eb\u3084\u7bc4\u56f2\u6307\u5b9a\u3001\u540d\u524d\u4ed8\u304d\u7bc4\u56f2\u306b\u3082\u5bfe\u5fdc\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aA1\u8a18\u6cd5<\/strong><br \/>\n      Excel\u3067\u30bb\u30eb\u3084\u7bc4\u56f2\u3092\u300cA1\u300d\u300cB2:C5\u300d\u306a\u3069\u306e\u6587\u5b57\u5217\u3067\u8868\u3059\u65b9\u6cd5\u3002\u76f4\u611f\u7684\u306b\u4f4d\u7f6e\u304c\u5206\u304b\u308b\u306e\u304c\u7279\u5fb4\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h3>\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u6bd4\u8f03\u8868<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u30d7\u30ed\u30d1\u30c6\u30a3<\/th>\n<th>\u30e1\u30ea\u30c3\u30c8<\/th>\n<th>\u30c7\u30e1\u30ea\u30c3\u30c8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Cells<\/strong><\/td>\n<td>\u884c\u30fb\u5217\u3092\u6570\u5024\u3067\u6307\u5b9a\u3067\u304d\u30eb\u30fc\u30d7\u51e6\u7406\u306b\u6700\u9069<\/td>\n<td>\u5217\u756a\u53f7\uff0826\u7b49\uff09\u304c\u76f4\u611f\u7684\u306b\u5206\u304b\u308a\u306b\u304f\u3044<\/td>\n<\/tr>\n<tr>\n<td><strong>Range<\/strong><\/td>\n<td>A1\u8a18\u6cd5\u3067\u76f4\u611f\u7684\u30fb\u8907\u6570\u7bc4\u56f2\u30fb\u540d\u524d\u4ed8\u304d\u7bc4\u56f2\u5bfe\u5fdc\u53ef<\/td>\n<td>\u30eb\u30fc\u30d7\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u8a18\u8ff0\u304c\u3084\u3084\u7169\u96d1\u306b\u306a\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>2. \u306a\u305cVBA\u306f\u9045\u3044\uff1fRange\u00d7\u914d\u5217\u304c\u9ad8\u901f\u306a\u300c\u672c\u5f53\u306e\u7406\u7531\u300d<\/h2>\n<h3>\u539f\u56e0\uff1aExcel\u3068VBA\u306e\u300c\u901a\u4fe1\u56de\u6570\u300d<\/h3>\n<p><strong>\u79c1\u305f\u3061\u304c\u9665\u308a\u304c\u3061\u306a\u7f60\u2015\u2015\u300c1\u30bb\u30eb\u305a\u3064\u30a2\u30af\u30bb\u30b9\u3059\u308b\u300d\uff1d\u201c1\u4e07\u56de\u901a\u4fe1\u201d\u3067\u7206\u9045\uff01<\/strong><\/p>\n<h4>NG\u4f8b\uff1a\u6fc0\u9045\u30eb\u30fc\u30d7<\/h4>\n<pre><code>Sub SlowDataAccess()\r\n    For i = 1 To 10000\r\n        Worksheets(\"Sheet1\").Cells(i, 1).Value = i\r\n    Next i\r\nEnd Sub\r\n<\/code><\/pre>\n<p><strong>\u2192 \u6bce\u56deVBA\u2192Excel\u9593\u3067\u901a\u4fe1\u30021\u4e07\u56de\u30a2\u30af\u30bb\u30b9\uff1d\u201c\u5f85\u3061\u6642\u9593\u201d\u5730\u7344\u3002<\/strong><\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u914d\u5217<\/strong><br \/>\n      \u8907\u6570\u306e\u5024\uff08\u30c7\u30fc\u30bf\uff09\u3092\u307e\u3068\u3081\u3066\u683c\u7d0d\u3067\u304d\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3002VBA\u3067\u306fRange\u306e\u5024\u3092\u4e00\u62ec\u3067\u8aad\u307f\u66f8\u304d\u3059\u308b\u969b\u306b\u4f7f\u3046\u3068\u9ad8\u901f\u5316\u3067\u304d\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u901a\u4fe1\u56de\u6570<\/strong><br \/>\n      VBA\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\uff09\u3068Excel\uff08\u30a2\u30d7\u30ea\u672c\u4f53\uff09\u304c\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u56de\u6570\u30021\u30bb\u30eb\u305a\u3064\u64cd\u4f5c\u3059\u308b\u3068\u901a\u4fe1\u304c\u591a\u304f\u306a\u308a\u9045\u304f\u306a\u308b\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h4>OK\u4f8b\uff1a\u914d\u5217\u00d7Range\u30672\u56de\u901a\u4fe1\u3060\u3051<\/h4>\n<pre><code>Sub FastDataAccess()\r\n    Dim dataArr As Variant\r\n    dataArr = Worksheets(\"Sheet1\").Range(\"A1:A10000\").Value ' \u8aad\u307f\u8fbc\u307f1\u56de\r\n    For i = 1 To 10000\r\n        dataArr(i, 1) = i\r\n    Next i\r\n    Worksheets(\"Sheet1\").Range(\"A1:A10000\").Value = dataArr ' \u66f8\u304d\u623b\u30571\u56de\r\nEnd Sub\r\n<\/code><\/pre>\n<p>\n    <strong>\u6bd4\u8f03\uff1a<\/strong>\n  <\/p>\n<ul>\n<li>Cells\u30eb\u30fc\u30d7\uff1a\u7d045,000\u30df\u30ea\u79d2<\/li>\n<li>Range\u00d7\u914d\u5217\uff1a\u7d0450\u30df\u30ea\u79d2\uff08<strong>100\u500d\u4ee5\u4e0a\u306e\u9ad8\u901f\u5316\uff01<\/strong>\uff09<\/li>\n<\/ul>\n<p><strong>\u7d50\u8ad6\uff1a<\/strong>\u5927\u91cf\u30c7\u30fc\u30bf\u306f\u300c\u914d\u5217\u2192Range\u3067\u4e00\u62ec\u51e6\u7406\u300d\u304c\u7d76\u5bfe\u6b63\u7fa9\u3002<\/p>\n<p>\n    \uff08Excel\u30de\u30af\u30ed\u306e\u73fe\u5834\u5b9f\u8df5\u3084\u672a\u7d4c\u9a13\u8005\u5411\u3051\u306e\u57fa\u790e\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\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<hr \/>\n<h2>3. \u5b9f\u884c\u6642\u30a8\u30e9\u30fc&#8217;1004&#8217;\u306e\u5b8c\u5168\u653b\u7565\u30ac\u30a4\u30c9<\/h2>\n<p>\n    \uff08VBA\u3067\u3088\u304f\u3042\u308b\u65e5\u4ed8\u5909\u63db\u3084Format\u95a2\u6570\u306e\u30a8\u30e9\u30fc\u5bfe\u7b56\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1835\/\" target=\"_blank\" rel=\"noopener\">VBA\u65e5\u4ed8\u6587\u5b57\u5217\u5909\u63db\u3092\u5b8c\u5168\u7406\u89e3\uff5cFormat\u30fbCDate\u3068\u30a8\u30e9\u30fc\u56de\u907f\u306e\u539f\u7406<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<p><strong>VBA\u521d\u5fc3\u8005\u304c\u5fc5\u305a\u3076\u3064\u304b\u308b\u300c\u5b9f\u884c\u6642\u30a8\u30e9\u30fc &#8216;1004&#8217;\u300d\u3002<\/strong>\u5b9f\u306f\u3001\u3088\u304f\u3042\u308b3\u3064\u306e\u30d1\u30bf\u30fc\u30f3\u306b\u96c6\u7d04\u3067\u304d\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u5b9f\u884c\u6642\u30a8\u30e9\u30fc &#8216;1004&#8217;<\/strong><br \/>\n      VBA\u3067\u3088\u304f\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u306e\u4e00\u3064\u3002\u5b58\u5728\u3057\u306a\u3044\u30bb\u30eb\u3084\u7bc4\u56f2\u3001\u30b7\u30fc\u30c8\u6307\u5b9a\u30df\u30b9\u306a\u3069\u3067\u767a\u751f\u3057\u3084\u3059\u3044\u3002\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u3001\u539f\u56e0\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h3>1. \u30b7\u30fc\u30c8\u306e\u6307\u5b9a\u6f0f\u308c\uff08\u6700\u983b\u51fa\uff09<\/h3>\n<pre><code>' NG\u4f8b\uff1a\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b7\u30fc\u30c8\u4ee5\u5916\u3060\u3068\u30a8\u30e9\u30fc\r\nRange(\"A1\").Value = 100\r\n\r\n' OK\u4f8b\uff1a\u30b7\u30fc\u30c8\u3092\u660e\u8a18\r\nWorksheets(\"Sheet1\").Range(\"A1\").Value = 100\r\n\r\n' \u30d9\u30b9\u30c8\uff1a\u5909\u6570\u5316\r\nDim ws As Worksheet\r\nSet ws = Worksheets(\"Sheet1\")\r\nws.Range(\"A1\").Value = 100\r\n<\/code><\/pre>\n<p><strong>\u30b3\u30c4\uff1a<\/strong>With\u6587\u3092\u4f7f\u3046\u3068\u8907\u6570\u884c\u307e\u3068\u3081\u3066\u660e\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aWorksheets<\/strong><br \/>\n      Excel\u30d6\u30c3\u30af\u5185\u306e\u5404\u30b7\u30fc\u30c8\u3092\u53c2\u7167\u30fb\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306eVBA\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3002\u30b7\u30fc\u30c8\u540d\u3067\u660e\u793a\u7684\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u610f\u56f3\u3057\u306a\u3044\u30b7\u30fc\u30c8\u64cd\u4f5c\u30df\u30b9\u3092\u9632\u3052\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aWith\u6587<\/strong><br \/>\n      \u8907\u6570\u884c\u306b\u308f\u305f\u3063\u3066\u540c\u3058\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4f8b\uff1aws\uff09\u3092\u7e70\u308a\u8fd4\u3057\u64cd\u4f5c\u3059\u308b\u969b\u306b\u4f7f\u3046VBA\u306e\u69cb\u6587\u3002\u30b3\u30fc\u30c9\u306e\u7c21\u6f54\u5316\u3068\u30df\u30b9\u9632\u6b62\u306b\u5f79\u7acb\u3064\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h3>2. Range\u540d\u306e\u30df\u30b9 or \u5b58\u5728\u3057\u306a\u3044\u7bc4\u56f2<\/h3>\n<pre><code>' \u6253\u3061\u9593\u9055\u3044\u3084\u7bc4\u56f2\u672a\u5b9a\u7fa9\u3060\u3068\u30a8\u30e9\u30fc\r\nRange(\"AA1\")  '\u2192\u672c\u5f53\u306f\"A1\"\u3060\u3063\u305f\r\n<\/code><\/pre>\n<p><strong>\u5bfe\u7b56\uff1a<\/strong>\u5b9a\u6570\u3084\u5909\u6570\u5316\u3067\u30d2\u30e5\u30fc\u30de\u30f3\u30a8\u30e9\u30fc\u3092\u9632\u6b62\u3002<\/p>\n<hr \/>\n<h3>3. \u7d50\u5408\u30bb\u30eb\u3078\u306e\u8aa4\u30a2\u30af\u30bb\u30b9<\/h3>\n<pre><code>' A1:B1\u304c\u7d50\u5408\u3055\u308c\u3066\u3044\u308b\u5834\u5408\r\nRange(\"B1\").Value = \"Error\" '\u2192\u30a8\u30e9\u30fc\r\n\r\n' \u5bfe\u7b56\r\nRange(\"B1\").MergeArea.Cells(1, 1).Value = \"OK\"\r\n<\/code><\/pre>\n<p><strong>\u9244\u5247\uff1a<\/strong>\u7d50\u5408\u30bb\u30eb\u306f\u300c\u5de6\u4e0a\u30bb\u30eb\u300d\u3092\u30bf\u30fc\u30b2\u30c3\u30c8\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aMergeArea<\/strong><br \/>\n      \u7d50\u5408\u30bb\u30eb\u7bc4\u56f2\u5168\u4f53\u3092\u8868\u3059VBA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002MergeArea.Cells(1,1)\u3067\u7d50\u5408\u7bc4\u56f2\u306e\u5de6\u4e0a\u30bb\u30eb\u3092\u53d6\u5f97\u3067\u304d\u308b\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>4. \u3088\u304f\u3042\u308b\u8cea\u554f\uff08FAQ\uff09<\/h2>\n<ul>\n<li>\n      <strong>Q1. <strong>Value<\/strong>\u3068<strong>Value2<\/strong>\u3001\u3069\u3061\u3089\u304c\u901f\u3044\uff1f<\/strong><br \/>\n      <strong>A1.<\/strong> \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u512a\u5148\u306a\u3089<strong>Value2<\/strong>\u3002<br \/>\n      <strong>Value<\/strong>\u306f\u65e5\u4ed8\u30fb\u901a\u8ca8\u306e\u5909\u63db\u3092\u542b\u3080\u305f\u3081\u9045\u304f\u3001<strong>Value2<\/strong>\u306f\u751f\u30c7\u30fc\u30bf\u3067\u9ad8\u901f\u3002<\/p>\n<blockquote>\n<p>\n          <strong>\u7528\u8a9e\u89e3\u8aac\uff1aValue \/ Value2<\/strong><br \/>\n          Value\u306f\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u6a19\u6e96\u30d7\u30ed\u30d1\u30c6\u30a3\u3002Value2\u306f\u65e5\u4ed8\u3084\u901a\u8ca8\u306e\u81ea\u52d5\u5909\u63db\u3092\u884c\u308f\u305a\u3001\u3088\u308a\u9ad8\u901f\u306b\u5024\u3092\u6271\u3048\u308b\u3002\n        <\/p>\n<\/blockquote>\n<\/li>\n<li>\n      <strong>Q2. \u98db\u3073\u98db\u3073\u306e\u7bc4\u56f2\u3082\u9078\u629e\u3067\u304d\u308b\uff1f<\/strong><br \/>\n      <strong>A2.<\/strong> <strong>Union<\/strong>\u30e1\u30bd\u30c3\u30c9\u3067OK\u3002<\/p>\n<pre><code>Union(Range(\"A1\"), Range(\"C3\")).Select<\/code><\/pre>\n<blockquote>\n<p>\n          <strong>\u7528\u8a9e\u89e3\u8aac\uff1aUnion<\/strong><br \/>\n          \u8907\u6570\u306e\u96e2\u308c\u305f\u30bb\u30eb\u3084\u7bc4\u56f2\u3092\u307e\u3068\u3081\u3066\u4e00\u3064\u306eRange\u3068\u3057\u3066\u6271\u3046VBA\u306e\u30e1\u30bd\u30c3\u30c9\u3002\n        <\/p>\n<\/blockquote>\n<\/li>\n<li>\n      <strong>Q3. Find\u3067\u898b\u3064\u304b\u3063\u305fRange\u306e\u6271\u3044\u65b9\u306f\uff1f<\/strong><br \/>\n      <strong>A3.<\/strong> \u898b\u3064\u304b\u3089\u306a\u3051\u308c\u3070<strong>Nothing<\/strong>\u8fd4\u5374\u306a\u306e\u3067\u3001<\/p>\n<pre><code>If Not foundCell Is Nothing Then ...<\/code><\/pre>\n<p>      \u3067\u5206\u5c90\u3002\n    <\/li>\n<li>\n      <strong>Q4. Rows\/Columns\u3068\u306e\u9055\u3044\u306f\uff1f<\/strong><br \/>\n      <strong>A4.<\/strong> \u884c\u5168\u4f53\u306f<strong>Rows<\/strong>\u3001\u5217\u5168\u4f53\u306f<strong>Columns<\/strong>\u3002<br \/>\n      \u30bb\u30eb\u5358\u4f4d\u306f<strong>Cells<\/strong>\u3001\u7bc4\u56f2\u5358\u4f4d\u306f<strong>Range<\/strong>\u3002<\/p>\n<blockquote>\n<p>\n          <strong>\u7528\u8a9e\u89e3\u8aac\uff1aRows \/ Columns<\/strong><br \/>\n          Rows\u306f\u884c\u5168\u4f53\u3001Columns\u306f\u5217\u5168\u4f53\u3092\u8868\u3059VBA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u4e00\u62ec\u64cd\u4f5c\u3084\u66f8\u5f0f\u8a2d\u5b9a\u306b\u4fbf\u5229\u3002\n        <\/p>\n<\/blockquote>\n<\/li>\n<li>\n      <strong>Q5. Offset\u3084Resize\u3063\u3066\u4f55\uff1f<\/strong><br \/>\n      <strong>A5.<\/strong> \u6307\u5b9a\u30bb\u30eb\u304b\u3089\u201c\u30ba\u30e9\u3059\u201d\u30fb\u201c\u30b5\u30a4\u30ba\u5909\u66f4\u201d\u3067\u304d\u308b\u30c6\u30af\u30cb\u30c3\u30af\u3002\u30c7\u30fc\u30bf\u91cf\u5909\u52d5\u6642\u306b\u4fbf\u5229\u3002<\/p>\n<blockquote>\n<p>\n          <strong>\u7528\u8a9e\u89e3\u8aac\uff1aOffset \/ Resize<\/strong><br \/>\n          Offset\u306f\u57fa\u6e96\u30bb\u30eb\u304b\u3089\u306e\u76f8\u5bfe\u4f4d\u7f6e\u3001Resize\u306f\u7bc4\u56f2\u306e\u884c\u6570\u30fb\u5217\u6570\u3092\u5909\u66f4\u3067\u304d\u308bVBA\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002\u52d5\u7684\u306a\u7bc4\u56f2\u6307\u5b9a\u3084\u30c7\u30fc\u30bf\u8ffd\u52a0\u6642\u306b\u6d3b\u8e8d\u3002\n        <\/p>\n<\/blockquote>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li><strong>Cells\u306f\u30eb\u30fc\u30d7\u3001Range\u306f\u56fa\u5b9a\u7bc4\u56f2<\/strong><\/li>\n<li><strong>\u9ad8\u901f\u5316\u306e\u30ab\u30ae\u306f\u300c\u901a\u4fe1\u56de\u6570\u300d\u524a\u6e1b<\/strong><\/li>\n<li><strong>\u914d\u5217\u00d7Range\u3067\u4e00\u62ec\u51e6\u7406\u304c\u6700\u901f<\/strong><\/li>\n<li><strong>\u30a8\u30e9\u30fc1004\u5bfe\u7b56\u306f\u300c\u30b7\u30fc\u30c8\u660e\u8a18\u300d\u306a\u30693\u3064\u304c\u9244\u677f<\/strong><\/li>\n<\/ul>\n<p>\u307e\u305a\u306f\u624b\u5143\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3001\u4eca\u65e5\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\uff06\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr \/>\n<\/div>\n","protected":false},"featured_media":1841,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1840"}],"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\/1841"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}