{"id":13264,"date":"2024-01-28T00:06:06","date_gmt":"2024-01-27T15:06:06","guid":{"rendered":"https:\/\/extan.jp\/?p=13264"},"modified":"2024-01-28T00:08:58","modified_gmt":"2024-01-27T15:08:58","slug":"%e3%80%90excel-vba%e3%80%91dictionary%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%ef%bc%81%e5%8f%82%e7%85%a7%e8%a8%ad%e5%ae%9a%e3%81%8b%e3%82%89%e7%b9%b0%e3%82%8a%e8%bf%94%e3%81%97%e5%87%a6%e7%90%86%e3%81%be","status":"publish","type":"post","link":"https:\/\/extan.jp\/?p=13264","title":{"rendered":"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01"},"content":{"rendered":"<p>VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001<\/p>\n<div class=\"kininarukoto1\">\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u304c\u308f\u304b\u3089\u306a\u3044<br \/>\n\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u3057\u305f\u3044\u304c\u65b9\u6cd5\u304c\u308f\u304b\u3089\u306a\u3044<\/div>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u304a\u60a9\u307f\u3092\u89e3\u6c7a\u3059\u308b<\/p>\n<div class=\"rdinfo\">\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\">\u3082\u304f\u3058<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extan.jp\/?p=13264\/#VBA%E3%81%AEDictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%A8%E3%81%AF\" title=\"VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306f\">VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306f<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extan.jp\/?p=13264\/#Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E5%8F%82%E7%85%A7%E8%A8%AD%E5%AE%9A%E3%81%AE%E6%96%B9%E6%B3%95\" title=\"Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u53c2\u7167\u8a2d\u5b9a\u306e\u65b9\u6cd5\">Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u53c2\u7167\u8a2d\u5b9a\u306e\u65b9\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extan.jp\/?p=13264\/#Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E5%9F%BA%E6%9C%AC%E7%9A%84%E3%81%AA%E6%A7%8B%E6%96%87%E3%81%A8%E4%BD%BF%E3%81%84%E6%96%B9\" title=\"Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u3068\u4f7f\u3044\u65b9\">Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u3068\u4f7f\u3044\u65b9<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=13264\/#Dictionary%E3%81%AE%E4%BD%9C%E6%88%90\" title=\"Dictionary\u306e\u4f5c\u6210\">Dictionary\u306e\u4f5c\u6210<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/extan.jp\/?p=13264\/#%E8%A6%81%E7%B4%A0%E3%81%AE%E8%BF%BD%E5%8A%A0\" title=\"\u8981\u7d20\u306e\u8ffd\u52a0\">\u8981\u7d20\u306e\u8ffd\u52a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/extan.jp\/?p=13264\/#%E8%A6%81%E7%B4%A0%E3%81%AE%E5%8F%96%E5%BE%97\" title=\"\u8981\u7d20\u306e\u53d6\u5f97\">\u8981\u7d20\u306e\u53d6\u5f97<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/extan.jp\/?p=13264\/#%E8%A6%81%E7%B4%A0%E3%81%AE%E5%AD%98%E5%9C%A8%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF\" title=\"\u8981\u7d20\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af\">\u8981\u7d20\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/extan.jp\/?p=13264\/#%E8%A6%81%E7%B4%A0%E3%81%AE%E5%89%8A%E9%99%A4\" title=\"\u8981\u7d20\u306e\u524a\u9664\">\u8981\u7d20\u306e\u524a\u9664<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/extan.jp\/?p=13264\/#%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E8%A6%81%E7%B4%A0%E3%81%AE%E5%89%8A%E9%99%A4\" title=\"\u3059\u3079\u3066\u306e\u8981\u7d20\u306e\u524a\u9664\">\u3059\u3079\u3066\u306e\u8981\u7d20\u306e\u524a\u9664<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/extan.jp\/?p=13264\/#%E8%A6%81%E7%B4%A0%E6%95%B0%E3%81%AE%E5%8F%96%E5%BE%97\" title=\"\u8981\u7d20\u6570\u306e\u53d6\u5f97\">\u8981\u7d20\u6570\u306e\u53d6\u5f97<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/extan.jp\/?p=13264\/#%E3%82%AD%E3%83%BC%E3%81%A8%E5%80%A4%E3%82%92%E3%83%AB%E3%83%BC%E3%83%97%E3%81%A7%E5%87%A6%E7%90%86\" title=\"\u30ad\u30fc\u3068\u5024\u3092\u30eb\u30fc\u30d7\u3067\u51e6\u7406\">\u30ad\u30fc\u3068\u5024\u3092\u30eb\u30fc\u30d7\u3067\u51e6\u7406<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/extan.jp\/?p=13264\/#Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E5%87%A6%E7%90%86%E3%81%A7%E6%96%87%E5%AD%97%E3%81%AE%E7%BD%AE%E6%8F%9B%E3%82%92%E8%A1%8C%E3%81%86%E6%96%B9%E6%B3%95\" title=\"Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u6587\u5b57\u306e\u7f6e\u63db\u3092\u884c\u3046\u65b9\u6cd5\">Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u6587\u5b57\u306e\u7f6e\u63db\u3092\u884c\u3046\u65b9\u6cd5<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/extan.jp\/?p=13264\/#%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E7%94%A8%E6%84%8F\" title=\"\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u7528\u610f\">\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u7528\u610f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/extan.jp\/?p=13264\/#%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%B3%E3%83%BC%E3%83%89\" title=\"\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/extan.jp\/?p=13264\/#%E7%BD%AE%E6%8F%9B%E3%83%AB%E3%83%BC%E3%83%AB%E3%81%AE%E8%BF%BD%E5%8A%A0\" title=\"\u7f6e\u63db\u30eb\u30fc\u30eb\u306e\u8ffd\u52a0\">\u7f6e\u63db\u30eb\u30fc\u30eb\u306e\u8ffd\u52a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/extan.jp\/?p=13264\/#%E7%BD%AE%E6%8F%9B%E5%AF%BE%E8%B1%A1%E3%81%AE%E3%82%B7%E3%83%BC%E3%83%88%E3%81%AE%E8%A8%AD%E5%AE%9A\" title=\"\u7f6e\u63db\u5bfe\u8c61\u306e\u30b7\u30fc\u30c8\u306e\u8a2d\u5b9a\">\u7f6e\u63db\u5bfe\u8c61\u306e\u30b7\u30fc\u30c8\u306e\u8a2d\u5b9a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/extan.jp\/?p=13264\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/extan.jp\/?p=13264\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/extan.jp\/?p=13264\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" title=\"\u3055\u3044\u3054\u306b\">\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%AEDictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%A8%E3%81%AF\"><\/span>VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<br \/>\n\u5177\u4f53\u7684\u306b\u306f\u9023\u60f3\u914d\u5217\u3084\u30cf\u30c3\u30b7\u30e5\u30c6\u30fc\u30d6\u30eb\u306b\u69cb\u9020\u304c\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E5%8F%82%E7%85%A7%E8%A8%AD%E5%AE%9A%E3%81%AE%E6%96%B9%E6%B3%95\"><\/span>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u53c2\u7167\u8a2d\u5b9a\u306e\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u53c2\u7167\u8a2d\u5b9a\u306f<\/p>\n<p>\u300cMicrosoft Scripting Runtime\u300d<\/p>\n<p>\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u306e\u53c2\u7167\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a8\u30af\u30bb\u30eb\u30ea\u30dc\u30f3\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u958b\u767a\u300d\u30bf\u30d6\uff1e\u300cVisual Basic\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<br \/>\nVBE\uff08Visual Basic Editor\uff09\u3092\u8d77\u52d5\u3057\u305f\u3089\u3001\u30e1\u30cb\u30e5\u30fc\u306e<br \/>\n\u300c\u30c4\u30fc\u30eb\u300d\uff1e\u300c\u53c2\u7167\u8a2d\u5b9a\u300d\uff1e\u300c\u53c2\u7167\u8a2d\u5b9a\u300d\u304b\u3089<br \/>\n\u300cMicrosoft Scripting Runtime\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u300cOK\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">CreateObject(&#8220;Scripting.Dictionary&#8221;)\u306e\u6307\u5b9a\u65b9\u6cd5\u306e\u5834\u5408\u306f\u300cMicrosoft Scripting Runtime\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u306a\u304f\u3066\u3082\u5b9f\u884c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E5%9F%BA%E6%9C%AC%E7%9A%84%E3%81%AA%E6%A7%8B%E6%96%87%E3%81%A8%E4%BD%BF%E3%81%84%E6%96%B9\"><\/span>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u3068\u4f7f\u3044\u65b9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u3068\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Dictionary%E3%81%AE%E4%BD%9C%E6%88%90\"><\/span>Dictionary\u306e\u4f5c\u6210<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u65b0\u3057\u3044 Dictionary \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\nDim \u3067\u5909\u6570objDict\u3092\u5ba3\u8a00\u3057\u3001CreateObject\u3092\u4f7f\u3063\u3066Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim objDict As Object\nSet dict = CreateObject(&quot;Scripting.Dictionary&quot;)<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A6%81%E7%B4%A0%E3%81%AE%E8%BF%BD%E5%8A%A0\"><\/span>\u8981\u7d20\u306e\u8ffd\u52a0<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Add\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 Dictionary\u306b\u65b0\u3057\u3044\u8981\u7d20\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067 Key \u306f\u30e6\u30cb\u30fc\u30af\u306a\u8b58\u5225\u5b50\uff08\u6587\u5b57\u5217\u3084\u6570\u5024\u306a\u3069\uff09\u3067\u3001Value \u306f\u305d\u306e\u30ad\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u308b\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u30ad\u30fc\u306f Dictionary \u5185\u3067\u4e00\u610f\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.Add Key, Value<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\nDictionary \u306b\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.Add &quot;apple&quot;, &quot;\u308a\u3093\u3054&quot;\nobjDict.Add &quot;orange&quot;, &quot;\u30aa\u30ec\u30f3\u30b8&quot;<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A6%81%E7%B4%A0%E3%81%AE%E5%8F%96%E5%BE%97\"><\/span>\u8981\u7d20\u306e\u53d6\u5f97<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Dictionary\u304b\u3089\u7279\u5b9a\u306e\u30ad\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n\u30ad\u30fc\u3092\u6307\u5b9a\u3057\u3066objDict(Key) \u3068\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u306e\u30ad\u30fc\u306b\u5bfe\u5fdc\u3059\u308b\u5024\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim value As Variant\nvalue = objDict(Key)<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\n\u7279\u5b9a\u306e\u30ad\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim fruit As Variant\nfruit = objDict(&quot;apple&quot;)  &#039; &quot;\u308a\u3093\u3054&quot; \u3092\u8fd4\u3059<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A6%81%E7%B4%A0%E3%81%AE%E5%AD%98%E5%9C%A8%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF\"><\/span>\u8981\u7d20\u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Exists\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u6307\u5b9a\u3057\u305f\u30ad\u30fc\u304c Dictionary \u5185\u306b\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<br \/>\n\u30ad\u30fc\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306fTrue\u3092\u8fd4\u3057\u3001\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306fFalse\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">If objDict.Exists(Key) Then\n    &#039; \u30ad\u30fc\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306e\u51e6\u7406\nEnd If<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\n\u7279\u5b9a\u306e\u30ad\u30fc\u304c\u5b58\u5728\u3059\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">If objDict.Exists(&quot;banana&quot;) Then\n    MsgBox &quot;\u30ad\u30fc &#039;banana&#039; \u304c\u5b58\u5728\u3057\u307e\u3059\u3002&quot;\nElse\n    MsgBox &quot;\u30ad\u30fc &#039;banana&#039; \u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002&quot;\nEnd If<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A6%81%E7%B4%A0%E3%81%AE%E5%89%8A%E9%99%A4\"><\/span>\u8981\u7d20\u306e\u524a\u9664<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u7279\u5b9a\u306e\u30ad\u30fc\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u8981\u7d20\u3092Dictionary\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\nRemove \u30e1\u30bd\u30c3\u30c9\u306b\u524a\u9664\u3057\u305f\u3044\u30ad\u30fc\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.Remove(Key)<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\n\u7279\u5b9a\u306e\u30ad\u30fc\u3092\u6301\u3064\u8981\u7d20\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.Remove(&quot;orange&quot;)<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E8%A6%81%E7%B4%A0%E3%81%AE%E5%89%8A%E9%99%A4\"><\/span>\u3059\u3079\u3066\u306e\u8981\u7d20\u306e\u524a\u9664<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>RemoveAll\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001Dictionary \u5185\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\u3092\u524a\u9664\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.RemoveAll()<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E8%A6%81%E7%B4%A0%E6%95%B0%E3%81%AE%E5%8F%96%E5%BE%97\"><\/span>\u8981\u7d20\u6570\u306e\u53d6\u5f97<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Count\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u3001Dictionary\u5185\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim count As Integer\ncount = objDict.Count<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\nDictionary \u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim numberOfItems As Integer\nnumberOfItems = objDict.Count\nMsgBox &quot;\u8981\u7d20\u6570: &quot; &amp; numberOfItems<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%E3%82%AD%E3%83%BC%E3%81%A8%E5%80%A4%E3%82%92%E3%83%AB%E3%83%BC%E3%83%97%E3%81%A7%E5%87%A6%E7%90%86\"><\/span>\u30ad\u30fc\u3068\u5024\u3092\u30eb\u30fc\u30d7\u3067\u51e6\u7406<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Dictionary\u306e\u3059\u3079\u3066\u306e\u30ad\u30fc\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30d7\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\nFor Each \u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066objDict.Keys\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u306e\u5404\u30ad\u30fc\u306b\u5bfe\u3059\u308b\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n\u5bfe\u5fdc\u3059\u308b\u5024\u306f objDict(key) \u3092\u4f7f\u7528\u3057\u3066\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim key As Variant\nFor Each key In objDict.Keys\n    &#039; key\u3092\u4f7f\u3063\u305f\u51e6\u7406\n    &#039; \u5bfe\u5fdc\u3059\u308b\u5024\u306f objDict(key) \u3067\u53d6\u5f97\u3067\u304d\u308b\nNext key<\/code><\/pre>\n<p><strong>\u30b5\u30f3\u30d7\u30eb<\/strong><br \/>\nDictionary \u306e\u3059\u3079\u3066\u306e\u30ad\u30fc\u3068\u5024\u3092\u30eb\u30fc\u30d7\u3067\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim k As Variant\nFor Each k In myDictionary.Keys\n    MsgBox &quot;\u30ad\u30fc: &quot; &amp; k &amp; &quot;, \u5024: &quot; &amp; myDictionary(k)\nNext k<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Dictionary%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E4%BD%BF%E3%81%84%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E5%87%A6%E7%90%86%E3%81%A7%E6%96%87%E5%AD%97%E3%81%AE%E7%BD%AE%E6%8F%9B%E3%82%92%E8%A1%8C%E3%81%86%E6%96%B9%E6%B3%95\"><\/span>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3067\u6587\u5b57\u306e\u7f6e\u63db\u3092\u884c\u3046\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u3001\u8907\u6570\u306e\u6587\u5b57\u5217\u306e\u7f6e\u63db\u3092\u7e70\u308a\u8fd4\u3057\u884c\u3046\u65b9\u6cd5\u3064\u3044\u3066\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E7%94%A8%E6%84%8F\"><\/span>\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u7528\u610f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u307e\u305a\u306f\u30a8\u30af\u30bb\u30eb\u306b\u30b7\u30fc\u30c8\u300cSheet1\u300d\u3092\u8ffd\u52a0\u3057\u3001\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u914d\u7f6e\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<table style=\"border-collapse: collapse; border=\"0\" width=\"70\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 18.0pt;\">\n<td style=\"height: 18.0pt; width: 53pt;\" width=\"70\" height=\"24\">\u65e7\u6587\u5b57\u52171<\/td>\n<\/tr>\n<tr style=\"height: 18.0pt;\">\n<td style=\"height: 18.0pt;\" height=\"24\">\u65e7\u6587\u5b57\u52172<\/td>\n<\/tr>\n<tr style=\"height: 18.0pt;\">\n<td style=\"height: 18.0pt;\" height=\"24\">\u65e7\u6587\u5b57\u52173<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13399\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_1.png\" alt=\"\" width=\"620\" height=\"379\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_1.png 620w, https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_1-300x183.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/>\n<p>\u4eca\u56de\u306f\u3053\u306e\u30e9\u30f3\u30c0\u30e0\u306b\u914d\u7f6e\u3057\u305f\u6587\u5b57\u5217\u3092\u300c\u65b0\u6587\u5b57\u5217*\u300d\u306b\u9023\u7d9a\u7f6e\u63db\u3059\u308b\u51e6\u7406\u3092\u884c\u3044\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%B3%E3%83%BC%E3%83%89\"><\/span>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u300c\u65b0\u6587\u5b57\u5217*\u300d\u306b\u9023\u7d9a\u7f6e\u63db\u3059\u308b\u51e6\u7406\u3092Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3063\u3066\u5b9f\u73fe\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub \u30b7\u30fc\u30c8\u306e\u6587\u5b57\u5217\u3092\u7f6e\u63db()\n    Dim objDict As Object\n    Dim ws As Worksheet\n    Dim cell As Range\n    Dim key As Variant\n    \n    Set objDict = CreateObject(&quot;Scripting.Dictionary&quot;)\n\n    &#039; \u7f6e\u63db\u30eb\u30fc\u30eb\u306e\u8a2d\u5b9a\u3057\u307e\u3059\u3002 (\u30ad\u30fc: \u7f6e\u63db\u524d\u306e\u6587\u5b57\u5217, \u5024: \u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217)\n    objDict.Add &quot;\u65e7\u6587\u5b57\u52171&quot;, &quot;\u65b0\u6587\u5b57\u52171&quot;\n    objDict.Add &quot;\u65e7\u6587\u5b57\u52172&quot;, &quot;\u65b0\u6587\u5b57\u52172&quot;\n    objDict.Add &quot;\u65e7\u6587\u5b57\u52173&quot;, &quot;\u65b0\u6587\u5b57\u52173&quot;\n    &#039; \u4ee5\u4e0b\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8ffd\u52a0\n\n    &#039; \u7f6e\u63db\u5bfe\u8c61\u306e\u30b7\u30fc\u30c8\u540d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n    Set ws = ThisWorkbook.Sheets(&quot;Sheet1&quot;)\n\n    For Each cell In ws.UsedRange\n    \n        &#039; \u6570\u5f0f\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u30bb\u30eb\u306e\u307f\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\n        If Not cell.HasFormula Then\n            For Each key In objDict.Keys\n                If InStr(cell.Value, key) &gt; 0 Then\n                    cell.Value = Replace(cell.Value, key, objDict(key))\n                End If\n            Next key\n        End If\n    Next cell\nEnd Sub\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u7279\u5b9a\u306e\u30b7\u30fc\u30c8\uff08\u4f8b\u3068\u3057\u3066 &#8220;Sheet1&#8243;\uff09\u5185\u306e\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u5bfe\u8c61\u306b\u3001Dictionary \u306b\u5b9a\u7fa9\u3055\u308c\u305f\u5404\u30ad\u30fc\uff08\u7f6e\u63db\u524d\u306e\u6587\u5b57\u5217\uff09\u3092\u5bfe\u5fdc\u3059\u308b\u5024\uff08\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217\uff09\u3067\u7f6e\u63db\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E7%BD%AE%E6%8F%9B%E3%83%AB%E3%83%BC%E3%83%AB%E3%81%AE%E8%BF%BD%E5%8A%A0\"><\/span>\u7f6e\u63db\u30eb\u30fc\u30eb\u306e\u8ffd\u52a0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u7f6e\u63db\u3057\u305f\u3044\u6587\u5b57\u5217\u304c\u3042\u308c\uff42\u3089\u7f6e\u63db\u30eb\u30fc\u30eb\u3092\u8ffd\u52a0\u3001\u307e\u305f\u306f\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">objDict.Add &quot;\u65e7\u6587\u5b57\u52171&quot;, &quot;\u65b0\u6587\u5b57\u52171&quot;\nobjDict.Add &quot;\u65e7\u6587\u5b57\u52172&quot;, &quot;\u65b0\u6587\u5b57\u52172&quot;\nobjDict.Add &quot;\u65e7\u6587\u5b57\u52173&quot;, &quot;\u65b0\u6587\u5b57\u52173&quot;<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E7%BD%AE%E6%8F%9B%E5%AF%BE%E8%B1%A1%E3%81%AE%E3%82%B7%E3%83%BC%E3%83%88%E3%81%AE%E8%A8%AD%E5%AE%9A\"><\/span>\u7f6e\u63db\u5bfe\u8c61\u306e\u30b7\u30fc\u30c8\u306e\u8a2d\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u64cd\u4f5c\u3092\u884c\u3046 Excel\u30b7\u30fc\u30c8&#8221;Sheet1&#8243;\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5225\u306e\u30b7\u30fc\u30c8\u540d\u306b\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Dim ws As Worksheet\nSet ws = ThisWorkbook.Sheets(&quot;Sheet1&quot;)<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>VBA\u3092\u5b9f\u884c\u3057\u3001\u6587\u5b57\u5217\u300c\u65b0\u6587\u5b57\u5217*\u300d\u306b\u9023\u7d9a\u7f6e\u63db\u3055\u308c\u308b\u304b\u78ba\u8a8d\u3092\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306f\u3044\u3001\u300c\u65b0\u6587\u5b57\u5217*\u300d\u306b\u9023\u7d9a\u7f6e\u63db\u3055\u308c\u307e\u3057\u305f\u306d\uff01<br \/>\nDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u304c\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_2.png\" alt=\"\" width=\"623\" height=\"373\" class=\"alignnone size-full wp-image-13400\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_2.png 623w, https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/012724_1434_2-300x180.png 300w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/>\n<h3><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3053\u306eVBA\u306f \u6307\u5b9a\u3055\u308c\u305f\u30b7\u30fc\u30c8\u5185\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u52b9\u7387\u7684\u306b\u7f6e\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u7f6e\u63db\u30eb\u30fc\u30eb\u3092\u8ffd\u52a0\u30fb\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u7f6e\u63db\u30cb\u30fc\u30ba\u306b\u5bfe\u5fdc\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044 Dictionary \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001objDict \u306b\u5272\u308a\u5f53\u3066\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>Set objDict = CreateObject(&quot;Scripting.Dictionary&quot;)<\/code><\/div>\n<p>\u3053\u3053\u3067\u306f\u3001Dictionary \u306b\u7f6e\u63db\u30eb\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002\u5404\u30eb\u30fc\u30eb\u306f\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3067\u3001\u30ad\u30fc\uff08\u65e7\u6587\u5b57\u5217\uff09\u304c\u898b\u3064\u304b\u3063\u305f\u5834\u5408\u3001\u305d\u308c\u3092\u5024\uff08\u65b0\u6587\u5b57\u5217\uff09\u306b\u7f6e\u63db\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>objDict.Add &quot;\u65e7\u6587\u5b57\u52171&quot;, &quot;\u65b0\u6587\u5b57\u52171&quot;<br \/>\nobjDict.Add &quot;\u65e7\u6587\u5b57\u52172&quot;, &quot;\u65b0\u6587\u5b57\u52172&quot;<br \/>\nobjDict.Add &quot;\u65e7\u6587\u5b57\u52173&quot;, &quot;\u65b0\u6587\u5b57\u52173&quot;<\/code><\/div>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u64cd\u4f5c\u3059\u308b\u30b7\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f &#8220;Sheet1&#8221; \u3068\u3044\u3046\u540d\u524d\u306e\u30b7\u30fc\u30c8\u3092\u5bfe\u8c61\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>Set ws = ThisWorkbook.Sheets(&quot;Sheet1&quot;)<\/code><\/div>\n<p>\u30b7\u30fc\u30c8\u306e\u4f7f\u7528\u6e08\u307f\u7bc4\u56f2 (UsedRange) \u5185\u306e\u5404\u30bb\u30eb\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30d7\u3092\u884c\u3044\u3001\u7f6e\u63db\u51e6\u7406\u3092\u304a\u3053\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u6570\u5f0f\u3092\u542b\u3080\u30bb\u30eb\u306f\u7f6e\u63db\u306e\u5bfe\u8c61\u5916\u3068\u3057\u3001\u30c6\u30ad\u30b9\u30c8\u306e\u307f\u3092\u542b\u3080\u30bb\u30eb\u3092\u5bfe\u8c61\u306b\u3057\u3001<br \/>\nInStr \u95a2\u6570\u3092\u4f7f\u3063\u3066\u30bb\u30eb\u306e\u5024\u306b\u30ad\u30fc\uff08\u7f6e\u63db\u524d\u306e\u6587\u5b57\u5217\uff09\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u305f\u4e0a\u3001<br \/>\nReplace \u95a2\u6570\u3067\u5b9f\u969b\u306e\u7f6e\u63db\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\"><code>For Each cell In ws.UsedRange<br \/>\n    If Not cell.HasFormula Then<br \/>\n        For Each key In objDict.Keys<br \/>\n            If InStr(cell.Value, key) &gt; 0 Then<br \/>\n                cell.Value = Replace(cell.Value, key, objDict(key))<br \/>\n            End If<br \/>\n        Next key<br \/>\n    End If<br \/>\nNext cell<\/code><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\"><\/span>\u3055\u3044\u3054\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<\/p>\n<div class=\"endinfo\">\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9<br \/>\n\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ed6\u306b\u3082\u4fbf\u5229\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u3051\u308c\u3070\u3054\u53c2\u7167\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001 \u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u304c\u308f\u304b\u3089\u306a\u3044 \u30fbExcel\u3067Dictionary\u30aa\u30d6&#8230;<\/p>\n","protected":false},"author":1,"featured_media":13402,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[29],"class_list":{"0":"post-13264","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-excelvba","8":"tag-29","9":"article cf"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=13264\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"og:description\" content=\"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=13264\" \/>\n<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-27T15:06:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-27T15:08:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png\" \/>\n\t<meta property=\"og:image:width\" content=\"857\" \/>\n\t<meta property=\"og:image:height\" content=\"607\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"13\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/extan.jp\/#website\",\"url\":\"https:\/\/extan.jp\/\",\"name\":\"\u30a8\u30af\u77ed\uff5cExtan.jp\",\"description\":\"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/extan.jp\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/?p=13264#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png\",\"contentUrl\":\"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png\",\"width\":857,\"height\":607,\"caption\":\"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/extan.jp\/?p=13264#webpage\",\"url\":\"https:\/\/extan.jp\/?p=13264\",\"name\":\"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\",\"isPartOf\":{\"@id\":\"https:\/\/extan.jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/extan.jp\/?p=13264#primaryimage\"},\"datePublished\":\"2024-01-27T15:06:06+00:00\",\"dateModified\":\"2024-01-27T15:08:58+00:00\",\"author\":{\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\"},\"description\":\"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/extan.jp\/?p=13264#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/extan.jp\/?p=13264\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/extan.jp\/?p=13264#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/extan.jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\",\"name\":\"\u30bf\u30ab\u30d2\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/#personlogo\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"caption\":\"\u30bf\u30ab\u30d2\u30ed@extan\"},\"url\":\"https:\/\/extan.jp\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"description":"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/extan.jp\/?p=13264","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","og_description":"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","og_url":"https:\/\/extan.jp\/?p=13264","og_site_name":"\u30a8\u30af\u77ed\uff5cExtan.jp","article_published_time":"2024-01-27T15:06:06+00:00","article_modified_time":"2024-01-27T15:08:58+00:00","og_image":[{"width":857,"height":607,"url":"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30bf\u30ab\u30d2\u30ed@extan","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"13\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/extan.jp\/#website","url":"https:\/\/extan.jp\/","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/extan.jp\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=13264#primaryimage","inLanguage":"ja","url":"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png","contentUrl":"https:\/\/extan.jp\/wp-content\/uploads\/2024\/01\/str-209.png","width":857,"height":607,"caption":"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01"},{"@type":"WebPage","@id":"https:\/\/extan.jp\/?p=13264#webpage","url":"https:\/\/extan.jp\/?p=13264","name":"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=13264#primaryimage"},"datePublished":"2024-01-27T15:06:06+00:00","dateModified":"2024-01-27T15:08:58+00:00","author":{"@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a"},"description":"\u30fbVBA\u306eDictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9\u30fbExcel\u3067Dictionary\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/extan.jp\/?p=13264#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/extan.jp\/?p=13264"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=13264#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp\/"},{"@type":"ListItem","position":2,"name":"\u3010Excel VBA\u3011Dictionary\u306e\u4f7f\u3044\u65b9\uff01\u53c2\u7167\u8a2d\u5b9a\u304b\u3089\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u307e\u3067\u8aac\u660e\uff01"}]},{"@type":"Person","@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/#personlogo","inLanguage":"ja","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","caption":"\u30bf\u30ab\u30d2\u30ed@extan"},"url":"https:\/\/extan.jp\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/13264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13264"}],"version-history":[{"count":13,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/13264\/revisions"}],"predecessor-version":[{"id":13408,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/13264\/revisions\/13408"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/media\/13402"}],"wp:attachment":[{"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}