{"id":1670,"date":"2019-05-15T12:00:14","date_gmt":"2019-05-15T03:00:14","guid":{"rendered":"https:\/\/www.bold.ne.jp\/engineer-club\/?p=1670"},"modified":"2025-10-06T17:37:46","modified_gmt":"2025-10-06T08:37:46","slug":"vba-instr","status":"publish","type":"post","link":"https:\/\/www.bold.ne.jp\/engineer-club\/vba-instr","title":{"rendered":"VBA\u306b\u304a\u3051\u308bInStr\u3068\u306f\uff1f\u7279\u5fb4\u3084\u57fa\u672c\u7684\u306a\u69cb\u6210\u3001InStr\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac"},"content":{"rendered":"<p><span>VBA\u306b\u304a\u3051\u308bInStr<\/span>\u95a2\u6570\u306f\u6587\u5b57\u5217\u304b\u3089\u691c\u7d22\u6587\u5b57\u5217\u3092\u63a2\u3057\u51fa\u3059\u3068\u304d\u306b\u4f7f\u3046\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u95a2\u6570\u306f\u5927\u304d\u304f<strong><u>\uff13\u3064\u306e\u7279\u5fb4<\/u><\/strong>\u304c\u3042\u308a\u307e\u3059\u3002\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092<strong>\u300c<span class=\"f-marker-p\">\u542b\u3080<\/span>\u300d\u30fb\u300c<span class=\"f-marker-p\">\u3042\u3044\u307e\u3044\u691c\u7d22\u3059\u308b<\/span>\u300d\u30fb\u300c<span class=\"f-marker-p\">\u8907\u6570\u691c\u7d22\u3059\u308b<\/span>\u300d<\/strong>\u306e\uff13\u3064\u3067\u3059\u3002\u3053\u306e\uff13\u3064\u306e\u7279\u5fb4\u3092<span>InStr<\/span>\u95a2\u6570\u306f\u6301\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\uff13\u3064\u306e\u7279\u5fb4\u3092\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4ea4\u3048\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u5f35\u308a\u4ed8\u3051\u3066\u3001\u305c\u3072\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#VBAInStrLike\">\uff11\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\uff13\u3064\u306e\u7279\u5fb4\u3068Like\u6f14\u7b97\u5b50\u3092\u6bd4\u8f03\u3059\u308b<\/a><ul><li><a href=\"#-InStr\">\uff11-\uff11\uff0eInStr\u95a2\u6570\u3001\uff11\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u542b\u3080\u300d<\/a><\/li><li><a href=\"#-InStr-2\">\uff11-\uff12\uff0eInStr\u95a2\u6570\u3001\uff12\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u3042\u3044\u307e\u3044\u691c\u7d22\u3059\u308b\u300d<\/a><\/li><li><a href=\"#-InStr-3\">\uff11-\uff13\uff0eInStr\u95a2\u6570\u3001\uff13\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u8907\u6570\u691c\u7d22\u3059\u308b\u300d<\/a><\/li><li><a href=\"#-Like\">\uff11-\uff14\uff0eLike\u6f14\u7b97\u5b50\u3067\u3082\u300c\u542b\u3080\u300d\u3068\u300c\u3042\u3044\u307e\u3044\u691c\u7d22\u300d\u304c\u3067\u304d\u308b<\/a><\/li><li><a href=\"#-_Split\">\uff11-\uff15\uff0e\u203b \u533a\u5207\u308a\u6587\u5b57\u304c\u300c\u30b9\u30da\u30fc\u30b9\u300d\u3084\u300c\u30d4\u30ea\u30aa\u30c9\u300d\u306e\u5834\u5408\u306e\u53d6\u308a\u51fa\u3057\u51e6\u7406\u306f\u300cSplit\u95a2\u6570\u300d\u3092\u6d3b\u7528\u3059\u308b<\/a><\/li><\/ul><\/li><li><a href=\"#VBAInStr\">\uff12\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\u69cb\u6587<\/a><ul><li><a href=\"#-InStr-4\">\uff12-\uff11\uff0eInStr\u95a2\u6570\u306e\u69cb\u6587\u306b\u3064\u3044\u3066<\/a><\/li><li><a href=\"#-Option_Compare\">\uff12-\uff12\uff0eOption Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u8a2d\u5b9a\u3059\u308b<\/a><\/li><\/ul><\/li><li><a href=\"#i\">\uff13\uff0e\u52d5\u4f5c\u78ba\u8a8d\u306f\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5229\u7528\u3059\u308b<\/a><\/li><li><a href=\"#VBAInStr-2\">\uff14\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\u4f7f\u3044\u65b9<\/a><ul><li><a href=\"#i-2\">\uff14-\uff11\uff0e\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092\u300c\u542b\u3080\u300d\u304b\u3069\u3046\u304b\u3092\u691c\u7d22\u3059\u308b<\/a><\/li><li><a href=\"#i-3\">\uff14-\uff12\uff0e\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3092\u533a\u5225\u3057\u306a\u3044\u3067\u691c\u7d22\u3059\u308b<\/a><\/li><li><a href=\"#-_Do_Loop\">\uff14-\uff13\uff0e\u691c\u7d22\u6587\u5b57\u5217\u304c\u8907\u6570\u542b\u307e\u308c\u308b\u5834\u5408\u306f Do Loop\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/a><\/li><li><a href=\"#i-4\">\uff14-\uff14\uff0e\u7279\u5b9a\u306e\u6587\u5b57\u5217\u3092\u53d6\u308a\u51fa\u3059<\/a><\/li><\/ul><\/li><li><a href=\"#i-5\">\uff15\uff0e\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/div>\n<h2><span id=\"VBAInStrLike\">\uff11\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\uff13\u3064\u306e\u7279\u5fb4\u3068Like\u6f14\u7b97\u5b50\u3092\u6bd4\u8f03\u3059\u308b<\/span><\/h2>\n<h3><span id=\"-InStr\">\uff11-\uff11\uff0eInStr\u95a2\u6570\u3001\uff11\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u542b\u3080\u300d<\/span><\/h3>\n<p>\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092\u300c\u542b\u3080\u300d\u304b\u3069\u3046\u304b\u3092\u691c\u7d22\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u300c\u542b\u3080\u300d\u306e\u4f7f\u3044\u65b9\u306f\u3055\u3089\u306b\uff13\u3064\u306e\u4f7f\u3044\u65b9\u304c\u3067\u304d\u307e\u3059\u3002\u300c\uff5e\u3092\u542b\u3080\u300d\u30fb\u300c\uff5e\u3092\u542b\u307e\u306a\u3044\u300d\u30fb\u300c\uff5e\u3067\u59cb\u307e\u308b\u300d\u3067\u3059\u3002\u3053\u306e\u6761\u4ef6\u306f\u623b\u308a\u5024\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u5224\u65ad\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><span>InStr<\/span>\u95a2\u6570\u306f\u623b\u308a\u5024\u306e\u7279\u9577\u3092\u5229\u7528\u3057\u305f\u65b9\u6cd5\u3067\u300c\u542b\u3080\u300d\u3092\u5224\u65ad\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-InStr-2\">\uff11-\uff12\uff0eInStr\u95a2\u6570\u3001\uff12\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u3042\u3044\u307e\u3044\u691c\u7d22\u3059\u308b\u300d<\/span><\/h3>\n<p>\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3092\u533a\u5225\u3057\u306a\u3044\u3067\u691c\u7d22\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<span>InStr<\/span>\u95a2\u6570\u306e\u5f15\u6570\u3001\u307e\u305f\u306f\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-InStr-3\">\uff11-\uff13\uff0eInStr\u95a2\u6570\u3001\uff13\u3064\u76ee\u306e\u7279\u5fb4\u3001\u300c\u8907\u6570\u691c\u7d22\u3059\u308b\u300d<\/span><\/h3>\n<p>\u691c\u7d22\u6587\u5b57\u5217\u304c\u4f55\u500b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3001<span>Do Loop<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-Like\">\uff11-\uff14\uff0eLike\u6f14\u7b97\u5b50\u3067\u3082\u300c\u542b\u3080\u300d\u3068\u300c\u3042\u3044\u307e\u3044\u691c\u7d22\u300d\u304c\u3067\u304d\u308b<\/span><\/h3>\n<p><span>Like<\/span>\u6f14\u7b97\u5b50\u3068\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u6761\u4ef6\u3067\u3082\u300c\u542b\u3080\u300d\u3068\u3044\u3046\u691c\u7d22\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u306f\u3001\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3092\u533a\u5225\u3057\u306a\u3044\u3067\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">strVal = \"\u30b7\u30d6\u30b7\u30b7\u30b7\u30d6\u30b7\u30c1\u30e7\u30a6\u30b7\u30d6\u30b7\u30ce\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\u30b7\u30d6\u30b7\u30b7\u30b7\u30e7\"\r\n\r\nIf strVal Like \"\u30b7\u30d6\u30b7*\" Then Debug.Print \"\u59cb\u307e\u308b\"\r\nIf strVal Like \"*\u30b7\u30d6\u30b7*\" Then Debug.Print \"\u542b\u3080\"\r\nIf strVal Like \"\uff7c\uff8c\uff9e\uff7c*\" Then Debug.Print \"\u59cb\u307e\u308b\"<\/pre>\n<p><span>InStr<\/span>\u95a2\u6570\u306f\u623b\u308a\u5024\u306e\u5024\u306b\u3088\u308a\u300c\u542b\u3080\u300d\u306a\u3069\u3092\u5224\u65ad\u3057\u307e\u3059\u3002<span>Like<\/span>\u6f14\u7b97\u5b50\u306f<span>If<\/span>\u6587\u3068\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u3001\u8907\u6570\u306e\u300c\u542b\u3080\u300d\u306a\u3069\u306e\u691c\u7d22\u3092\u3057\u307e\u3059\u3002<span>Like<\/span>\u6f14\u7b97\u5b50\u306e\u4f7f\u3044\u65b9\u3092\u77e5\u3063\u3066\u304a\u304f\u3053\u3068\u3082\u6709\u76ca\u3067\u3059\u3002\u305d\u3057\u3066\u308f\u304b\u308a\u3084\u3059\u3044\u30b3\u30fc\u30c9\u8a18\u8ff0\u3068\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h3><span id=\"-_Split\"><span>\uff11-\uff15\uff0e<\/span><strong>\u203b \u533a\u5207\u308a\u6587\u5b57\u304c\u300c\u30b9\u30da\u30fc\u30b9\u300d\u3084\u300c\u30d4\u30ea\u30aa\u30c9\u300d\u306e\u5834\u5408\u306e\u53d6\u308a\u51fa\u3057\u51e6\u7406\u306f\u300c<span>Split<\/span>\u95a2\u6570\u300d\u3092\u6d3b\u7528\u3059\u308b<\/strong><\/span><\/h3>\n<p>\u540d\u524d\u3092\u533a\u5207\u308b\u3001<span>IP<\/span>\u30a2\u30c9\u30ec\u30b9\u3092\u30aa\u30af\u30c6\u30c3\u30c8\u306b\u5206\u5272\u3059\u308b\u5834\u5408\u306f\u3001<span>InStr<\/span>\u95a2\u6570\u3067\u8abf\u3079\u305f\u4f4d\u7f6e\u3092<span>Left<\/span>\u95a2\u6570\u3084<span>Mid<\/span>\u95a2\u6570\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3057\u53d6\u308a\u51fa\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u533a\u5207\u308a\u6587\u5b57\u304c\u300c\u30b9\u30da\u30fc\u30b9\u300d\u3084\u300c\u30d4\u30ea\u30aa\u30c9\u300d\u306a\u3069\u306e\u5834\u5408\u306f\u3001\u300c<span>Split<\/span>\u95a2\u6570\u300d\u3092\u6d3b\u7528\u3059\u308b\u65b9\u304c\u89e3\u308a\u3084\u3059\u304f\u3001\u51e6\u7406\u3082\u30b9\u30e0\u30fc\u30ba\u306b\u306a\u308a\u307e\u3059\u3002\u300c<span>Split<\/span>\u95a2\u6570\u300d\u306e\u4f7f\u3044\u65b9\u3092\u77e5\u3063\u3066\u304a\u304f\u3053\u3068\u3082\u6709\u76ca\u3067\u3059\u3002\u305d\u3057\u3066\u308f\u304b\u308a\u3084\u3059\u3044\u30b3\u30fc\u30c9\u8a18\u8ff0\u3068\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h2><span id=\"VBAInStr\">\uff12\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\u69cb\u6587<\/span><\/h2>\n<h3><span id=\"-InStr-4\">\uff12-\uff11\uff0eInStr\u95a2\u6570\u306e\u69cb\u6587\u306b\u3064\u3044\u3066<\/span><\/h3>\n<blockquote>\n<p>\u3010\u66f8\u5f0f\u3011<\/p>\n<p>Instr ([\u958b\u59cb\u4f4d\u7f6e<span> ,] <\/span><strong>\u6587\u5b57\u5217<\/strong> , <strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong> [, \u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u623b\u308a\u5024\u306f<strong><span>Variant<\/span><\/strong>\u578b\u3067\u3059<\/p>\n<\/blockquote>\n<p>\u5f15\u6570\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 28.553%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u5f15\u6570<\/strong><\/td>\n<td style=\"width: 58.1395%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u8aac\u660e<\/strong><\/td>\n<td style=\"width: 13.3074%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u7701\u7565\u5024<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 28.553%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">\u958b\u59cb\u4f4d\u7f6e\uff08\u7701\u7565\u53ef\u80fd\uff09<\/td>\n<td style=\"width: 58.1395%; border-color: #000000; height: 24px;\">\u958b\u59cb\u3059\u308b\u4f4d\u7f6e\uff08\u7701\u7565\u3059\u308b\u3068<span>1<\/span>\u3068\u306a\u308b\uff09<\/td>\n<td style=\"width: 13.3074%; border-color: #000000; text-align: center; height: 24px;\">1<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 28.553%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u6587\u5b57\u5217\uff08\u5fc5\u9808\uff09<\/strong><\/td>\n<td style=\"width: 58.1395%; border-color: #000000; height: 24px;\">\u3082\u3068\u3068\u306a\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3059\u308b<\/td>\n<td style=\"width: 13.3074%; border-color: #000000; text-align: center; height: 24px;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 28.553%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u691c\u7d22\u6587\u5b57\u5217\uff08\u5fc5\u9808\uff09<\/strong><\/td>\n<td style=\"width: 58.1395%; border-color: #000000; height: 24px;\">\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3059\u308b<\/td>\n<td style=\"width: 13.3074%; border-color: #000000; text-align: center; height: 24px;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 28.553%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">\u6bd4\u8f03\u65b9\u6cd5\uff08\u7701\u7565\u53ef\u80fd\uff09<\/td>\n<td style=\"width: 58.1395%; border-color: #000000; height: 24px;\">\u6bd4\u8f03\u65b9\u6cd5\u3092\u793a\u3059\u6570\u5024\u3002\u5024\u306b\u3064\u3044\u3066\u306f\u3001\u300c\u6bd4\u8f03\u65b9\u6cd5 \u5b9a\u6570\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/td>\n<td style=\"width: 13.3074%; border-color: #000000; text-align: center; height: 24px;\">0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bd4\u8f03\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u6bd4\u8f03\u65b9\u6cd5 \u5b9a\u6570<\/strong><\/td>\n<td style=\"width: 59.4316%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u8aac\u660e<\/strong><\/td>\n<td style=\"width: 7.23506%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u5024<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">vbUseCompareOption<\/td>\n<td style=\"width: 59.4316%; border-color: #000000; height: 24px;\">Option Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03\u3059\u308b<\/td>\n<td style=\"width: 7.23506%; border-color: #000000; height: 24px;\">-1<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">vbBinaryCompare<\/td>\n<td style=\"width: 59.4316%; border-color: #000000; height: 24px;\">\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<br \/>\n\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092<strong>\u533a\u5225\u3057\u307e\u3059<\/strong>\u3002<\/td>\n<td style=\"width: 7.23506%; border-color: #000000; height: 24px;\">0<\/td>\n<\/tr>\n<tr style=\"height: 21px;\">\n<td style=\"width: 33.3333%; border-color: #000000; height: 21px; background-color: #c7c3c3;\">vbTextCompare<\/td>\n<td style=\"width: 59.4316%; border-color: #000000; height: 21px;\">\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<br \/>\n\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3002<\/td>\n<td style=\"width: 7.23506%; border-color: #000000; height: 21px;\">1<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">vbDatabaseCompare<br \/>\n(Access\u306e\u307f<span>)<\/span><\/td>\n<td style=\"width: 59.4316%; border-color: #000000; height: 24px;\">DB\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u8a2d\u5b9a\u3067\u6bd4\u8f03\u3059\u308b<\/td>\n<td style=\"width: 7.23506%; border-color: #000000; height: 24px;\">2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u300c<span>vbUseCompareOption<\/span>\u300d\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u6307\u5b9a\u3057\u305f\u5024\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-Option_Compare\">\uff12-\uff12\uff0eOption Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u8a2d\u5b9a\u3059\u308b<\/span><\/h3>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306bOption Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u306fExcel\u306f\uff12\u3064\u3002Access\u306f\uff13\u3064\u3067\u3059\u3002<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>Option Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u8a2d\u5b9a\u65b9\u6cd5<\/strong><\/td>\n<td style=\"width: 50%; border-color: #000000; height: 24px; background-color: #c7c3c3;\"><strong>\u8aac\u660e<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">Option Compare Binary<\/td>\n<td style=\"width: 50%; border-color: #000000; height: 24px;\">\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; border-color: #000000; height: 24px; background-color: #c7c3c3;\">Option Compare Text<\/td>\n<td style=\"width: 50%; border-color: #000000; height: 24px;\">\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 50%; border-color: #000000; height: 48px; background-color: #c7c3c3;\">Option Compare Database<br \/>\n(Access\u306e\u307f<span>)<\/span><\/td>\n<td style=\"width: 50%; border-color: #000000; height: 48px;\">DB\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u8a2d\u5b9a\u3067\u6bd4\u8f03\u3059\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"i\">\uff13\uff0e\u52d5\u4f5c\u78ba\u8a8d\u306f\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5229\u7528\u3059\u308b<\/span><\/h2>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u306f\u3001<span>Debug.Print<\/span>\u3092\u4f7f\u3044\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u5229\u7528\u304c\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u304d\u307e\u3059\u3002\uff08<span>[<\/span>\u8868\u793a<span>]<\/span>\u30e1\u30cb\u30e5\u30fc \u2192 <span>[<\/span>\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6<span>]<\/span>\u3092\u9078\u629e\u3057\u307e\u3059\uff09<\/p>\n<p>\u30b3\u30fc\u30c9\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u5f53\u3066\u3066\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u3001\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3078\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\n\r\nSub Sample3()\r\n    Debug.Print \"Hello, World!\"\r\nEnd Sub<\/pre>\n<p><strong><span class=\"f-marker-p\">\u25a0\u5b9f\u884c\u7d50\u679c\uff1a<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/b428eb5d5e52e0415ca0804cfea87bd3.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/b428eb5d5e52e0415ca0804cfea87bd3.jpg\" alt=\"\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a4\u30f3\u30c9\u30a6\" width=\"482\" height=\"137\" class=\"alignnone size-full wp-image-1672\" \/><\/a><\/p>\n<h2><span id=\"VBAInStr-2\">\uff14\uff0e\u3010VBA\u3011InStr\u95a2\u6570\u306e\u4f7f\u3044\u65b9<\/span><\/h2>\n<h3><span id=\"i-2\">\uff14-\uff11\uff0e\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092\u300c\u542b\u3080\u300d\u304b\u3069\u3046\u304b\u3092\u691c\u7d22\u3059\u308b<\/span><\/h3>\n<p><span>Instr<\/span>\u95a2\u6570\u306f\u6587\u5b57\u5217\u306e\u4e2d\u304b\u3089\u691c\u7d22\u6587\u5b57\u5217\u3092\u691c\u7d22\u3057\u3001\u898b\u3064\u304b\u3063\u305f\u4f4d\u7f6e\u3092\u6570\u5024\u3067\u8fd4\u3059\u95a2\u6570\u3067\u3059\u3002\uff13\u3064\u306e\u4f7f\u3044\u65b9\u3001\u300c\uff5e\u3092\u542b\u3080\u300d\u30fb\u300c\uff5e\u3092\u542b\u307e\u306a\u3044\u300d\u30fb\u300c\uff5e\u3067\u59cb\u307e\u308b\u300d\u3068\u3044\u3046\u6761\u4ef6\u306f\u3001\u623b\u308a\u5024\u306e\u7279\u9577\u3092\u5229\u7528\u3057\u305f\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u623b\u308a\u5024\u304c\u3001\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u304d\u306f\u30010\u306e\u300c\uff5e\u3092\u542b\u307e\u306a\u3044\u300d\u3002\u898b\u3064\u304b\u3063\u305f\u3068\u304d\u306f\u3001\u300c\uff5e\u3092\u542b\u3080\u300d\u3002\u623b\u308a\u5024\u304c1\u306e\u5834\u5408\u306f\u300c\uff5e\u3067\u59cb\u307e\u308b\u300d\u3068\u5224\u65ad\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\n\r\nSub Sample4_1()\r\n    Dim strVal As String\r\n    Dim varRet As Variant\r\n    \r\n    strVal = \"\u30b7\u30d6\u30b7\u30b7\u30b7\u30d6\u30b7\u30c1\u30e7\u30a6\u30b7\u30d6\u30b7\u30ce\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\u30b7\u30d6\u30b7\u30b7\u30b7\u30e7\"\r\n    ' \u300c\uff5e\u3092\u542b\u3080\u300d\r\n    varRet = InStr(strVal, \"\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\")\r\n    Debug.Print varRet                  '15\r\n    ' \u300c\uff5e\u3092\u542b\u307e\u306a\u3044\u300d\r\n    varRet = InStr(strVal, \"\u3057\u3076\u3057\")\r\n    Debug.Print varRet                  '0\r\n    ' \u300c\uff5e\u3067\u59cb\u307e\u308b\u300d\r\n    varRet = InStr(strVal, \"\u30b7\u30d6\u30b7\")\r\n    Debug.Print varRet                  '1\r\nEnd Sub<\/pre>\n<p><strong><span class=\"f-marker-p\">\u25a0\u5b9f\u884c\u7d50\u679c\uff1a<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/a21f4cb999e4b06e4f84ce8a979576cd.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/a21f4cb999e4b06e4f84ce8a979576cd.png\" alt=\"\u5b9f\u884c\u7d50\u679c\u2460\" width=\"397\" height=\"79\" class=\"alignnone size-full wp-image-1673\" \/><\/a><\/p>\n<h3><span id=\"i-3\">\uff14-\uff12\uff0e\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3092\u533a\u5225\u3057\u306a\u3044\u3067\u691c\u7d22\u3059\u308b<\/span><\/h3>\n<p>\u25a0\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9<\/p>\n<p><span>InStr<\/span>\u95a2\u6570\u306f\u5f15\u6570\u3092\u8a2d\u5b9a\u3057\u306a\u3051\u308c\u3070\u3001\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u307e\u3059\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u306b\u3059\u308b\u306b\u306f\u3001\u7b2c<span>4<\/span>\u5f15\u6570\u306b<span> &#8220;vbTextCompare&#8221; <\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u4ed6\u306e\u65b9\u6cd5\u3068\u3057\u3066\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u300c<span>Option Compare Text<\/span>\u300d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3092\u533a\u5225\u3057\u306a\u3044\u3067\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Text\r\n\r\nSub Sample4_2()\r\n    Dim strVal As String\r\n    Dim varRet As Variant\r\n    \r\n    strVal = \"\u30b7\u30d6\u30b7\u30b7\u30b7\u30d6\u30b7\u30c1\u30e7\u30a6\u30b7\u30d6\u30b7\u30ce\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\u30b7\u30d6\u30b7\u30b7\u30b7\u30e7\"\r\n    ' \u534a\u89d2\uff76\uff80\uff76\uff85\r\n    varRet = InStr(strVal, \"\uff7c\uff8c\uff9e\uff7c\uff7c\uff94\uff78\uff7c\uff6e\")\r\n    Debug.Print varRet                  '15\r\n    ' \u5168\u89d2\u3072\u3089\u304c\u306a\r\n    varRet = InStr(strVal, \"\u3057\u3076\u3057\")\r\n    Debug.Print varRet                  '1\r\n    strVal = \"shibushishishibushichoushibushinoshibushishiyakushoshibushishisho\"\r\n    ' \u5927\u6587\u5b57\r\n    varRet = InStr(strVal, \"SHIBUSHI\")\r\n    Debug.Print varRet                  '1\r\nEnd Sub<\/pre>\n<p><strong><span class=\"f-marker-p\">\u25a0\u5b9f\u884c\u7d50\u679c\uff1a<\/span><\/strong><\/p>\n<p>\u3059\u3079\u3066\u306e\u691c\u7d22\u6587\u5b57\u5217\u304c\u898b\u3064\u304b\u3063\u305f\u3002\u623b\u308a\u5024\u304c\u30bc\u30ed\u3067\u306f\u306a\u3044\u3002<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/124f6bb7f202349b770729597cff709c.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/124f6bb7f202349b770729597cff709c.png\" alt=\"\u5b9f\u884c\u7d50\u679c\u2461\" width=\"398\" height=\"79\" class=\"alignnone size-full wp-image-1674\" \/><\/a><\/p>\n<h3><span id=\"-_Do_Loop\">\uff14-\uff13\uff0e\u691c\u7d22\u6587\u5b57\u5217\u304c\u8907\u6570\u542b\u307e\u308c\u308b\u5834\u5408\u306f Do Loop\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/span><\/h3>\n<p>\u6587\u5b57\u5217\u306e\u4e2d\u306b\u691c\u7d22\u6587\u5b57\u5217\u304c\u4f55\u500b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u8907\u6570\u542b\u307e\u308c\u308b\u304b\u3092\u8abf\u3079\u308b\u5834\u5408\u306f<span> Do Loop<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068<span>InStr<\/span>\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Text\r\n\r\nSub Sample4_3()\r\n    Dim strVal  As String\r\n    Dim varRet  As Variant\r\n    Dim lngCnt  As Long\r\n    \r\n    strVal = \"\u30b7\u30d6\u30b7\u30b7\u30b7\u30d6\u30b7\u30c1\u30e7\u30a6\u30b7\u30d6\u30b7\u30ce\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\u30b7\u30d6\u30b7\u30b7\u30b7\u30e7\"\r\n    lngCnt = 0\r\n    Do\r\n        varRet = InStr(varRet + 1, strVal, \"\uff7c\uff8c\uff9e\uff7c\")\r\n        If varRet &lt;&gt; 0 Then lngCnt = lngCnt + 1\r\n        \r\n        Debug.Print varRet                  '1 , 5 , 11 , 15 , 23 , 0\r\n    Loop Until varRet = 0\r\n    Debug.Print lngCnt &amp; \" \u30ab\u30a6\u30f3\u30c8\"        '5\r\nEnd Sub<\/pre>\n<p><strong><span class=\"f-marker-p\">\u25a0\u5b9f\u884c\u7d50\u679c\uff1a<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/5a4754aa73a6ab26b89a1ca1e53e13cb.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/5a4754aa73a6ab26b89a1ca1e53e13cb.png\" alt=\"\u5b9f\u884c\u7d50\u679c\u2462\" width=\"395\" height=\"129\" class=\"alignnone size-full wp-image-1675\" \/><\/a><\/p>\n<p>\u534a\u89d2\u30ab\u30bf\u30ab\u30ca\u306e<span>&#8220;<\/span>\uff7c\uff8c\uff9e\uff7c<span>&#8220;<\/span>\u3067\u3059\u304c\u3001\u5168\u89d2\u30ab\u30bf\u30ab\u30ca\u306e\u6587\u5b57\u5217\u306e\u4f4d\u7f6e\u3001<span>1 , 5 , 11 , 15 , 23<\/span>\u756a\u76ee\u306b\u5b58\u5728\u3057\u307e\u3057\u305f\u3002\u305d\u3057\u3066<span>5<\/span>\u3064\u3042\u308a\u307e\u3057\u305f\u3002\u30ab\u30a6\u30f3\u30c8\u6570\u306b\u3088\u308a\u3001\u4f8b\u3048\u3070\u3001\u691c\u7d22\u6587\u5b57\u3092\u53d6\u308a\u51fa\u3059\u306a\u3069\u306e\u30d1\u30bf\u30fc\u30f3\u51e6\u7406\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<h3><span id=\"i-4\">\uff14-\uff14\uff0e\u7279\u5b9a\u306e\u6587\u5b57\u5217\u3092\u53d6\u308a\u51fa\u3059<\/span><\/h3>\n<p><span>InStr<\/span>\u95a2\u6570\u306e\u30b5\u30a4\u30c8\u306e\u691c\u7d22\u3067\u30d2\u30c3\u30c8\u3059\u308b\u300c\u6587\u5b57\u5217\u3092\u629c\u304d\u51fa\u3059\u300d\u3001\u300c\u6307\u5b9a\u3057\u53d6\u308a\u51fa\u3059\u300d\u3001\u300c\u7279\u5b9a\u306e\u6587\u5b57\u306e\u5f8c\u308d\u3092\u5168\u3066\u524a\u9664\u3059\u308b\u300d\u306a\u3069\u306e<strong>\u300c\u53d6\u308a\u51fa\u3059\u300d\u51e6\u7406<\/strong>\u306f\u3001<span>Do Loop<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068<span>InStr<\/span>\u95a2\u6570\u3001\u305d\u3057\u3066<span>Mid<\/span>\u95a2\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u52d5\u7684\u914d\u5217\u306b\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3067\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001\u691c\u7d22\u6587\u5b57\u5217\u304c\u3001\uff11\u3064\u542b\u3080\u3067\u3082\u3001\u8907\u6570\u542b\u3080\u3067\u3082\u3001\u542b\u307e\u306a\u3044\u3067\u3082\u3001\u5404\u8981\u7d20\u3092\u53d6\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Text\r\n\r\nSub Sample4_4()\r\n    Dim strVal      As String\r\n    Dim varRet      As Variant\r\n    Dim varMae      As Variant\r\n    Dim varArray()  As Variant\r\n    Dim Ix          As Long\r\n    Dim lngLen      As Long\r\n    \r\n    strVal = \"\u30b7\u30d6\u30b7\u30b7\u30b7\u30d6\u30b7\u30c1\u30e7\u30a6\u30b7\u30d6\u30b7\u30ce\u30b7\u30d6\u30b7\u30b7\u30e4\u30af\u30b7\u30e7\u30b7\u30d6\u30b7\u30b7\u30b7\u30e7\"\r\n    \r\n    Erase varArray                          '\u914d\u5217\u521d\u671f\u5316\r\n    varMae = 1\r\n    Do\r\n        varRet = InStr(varRet + 1, strVal, \"\u30b7\u30d6\u30b7\")\r\n        Debug.Print varRet                  '1 , 5 , 11 , 15 , 23 , 0\r\n       \r\n        '\u52d5\u7684\u914d\u5217\u3078\u683c\u7d0d\r\n        If varRet &lt;&gt; 1 Then\r\n            lngLen = varRet - varMae\r\n            If varRet = 0 Then lngLen = LenB(strVal) - varMae\r\n            ReDim Preserve varArray(Ix)     '\u8981\u7d20\u6570\u518d\u5b9a\u7fa9\r\n            varArray(Ix) = Mid(strVal, varMae, lngLen)\r\n            Ix = Ix + 1\r\n        End If\r\n        varMae = varRet\r\n    Loop Until varRet = 0\r\n    \r\n    For Ix = 0 To UBound(varArray)\r\n        Debug.Print Ix + 1 &amp; \"\u500b\u76ee\uff1a\" &amp; varArray(Ix)\r\n    Next Ix\r\nEnd Sub<\/pre>\n<p><strong><span class=\"f-marker-p\">\u25a0\u5b9f\u884c\u7d50\u679c\uff1a<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/d487d89857f4c71b1070e5f124b014c7.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/05\/d487d89857f4c71b1070e5f124b014c7.png\" alt=\"\u5b9f\u884c\u7d50\u679c\u2463\" width=\"398\" height=\"208\" class=\"alignnone size-full wp-image-1676\" \/><\/a><\/p>\n<p>&#8220;\u30b7\u30d6\u30b7\u3067\u3059\u304c\u3001\u6587\u5b57\u5217\u306e\u4f4d\u7f6e\u30011 , 5 , 11 , 15 , 23\u756a\u76ee\u306b\u5b58\u5728\u3057\u307e\u3057\u305f\u3002\u305d\u3057\u30665\u3064\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2><span id=\"i-5\">\uff15\uff0e\u3055\u3044\u3054\u306b<\/span><\/h2>\n<p>\u6700\u5f8c\u306b\u3001<span>InStr<\/span>\u95a2\u6570\u306f\u6587\u5b57\u5217\u304b\u3089\u691c\u7d22\u6587\u5b57\u5217\u3092\u63a2\u3057\u51fa\u3059\u3068\u304d\u306b\u4f7f\u3046\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p>\u3068\u304f\u306b\u3001\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092\u300c\u542b\u3080\u300d\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u306f\u6709\u76ca\u306a\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u300c\u542b\u3080\u300d\u306e\u4f7f\u3044\u65b9\u3001\u300c\uff5e\u3092\u542b\u3080\u300d\u30fb\u300c\uff5e\u3092\u542b\u307e\u306a\u3044\u300d\u3068\u3044\u3046\u6761\u4ef6\u306f\u3001<span>FB<\/span>\u306e\u7167\u5408\u3067\u4f7f\u7528\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u632f\u8fbc\u4eba\u6b04\u3068\u9867\u5ba2\u30de\u30b9\u30bf\u306e\u300c\u632f\u8fbc\u4eba\u6b04<span>(n)<\/span>\u300d\u3068\u3067\u7167\u5408\u3059\u308b\u306e\u3067\u3059\u3002\u305d\u308c\u3067\u3082\u7121\u3044\u5834\u5408\u306f\u632f\u8fbc\u4eba\u6b04\u3068\u9867\u5ba2\u30de\u30b9\u30bf\u306e\u300c\u9867\u5ba2\u540d\u30ab\u30ca\u300d\u3068\u7167\u5408\u3059\u308b\u306e\u3067\u3059\u3002\u3053\u306e\u6642\u3001<span>&#8220;<\/span>\uff76<span>)&#8221; <\/span>\u3084<span> &#8220;(<\/span>\uff76<span>&#8221; <\/span>\u3092\u524a\u9664\u3057\u306a\u304f\u3066\u3082\u3088\u3044\u300c<span>InStr<\/span>\u95a2\u6570\u300d\u306f\u305f\u3044\u3078\u3093\u5f79\u306b\u7acb\u3061\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u306e\u6bd4\u8f03\u3092\u5f15\u6570\u3067\u6307\u5b9a\u3059\u308c\u3070\u3001\u5168\u89d2\u306e\u300c\u9867\u5ba2\u540d\u30ab\u30ca\u300d\u3067\u3082\u7167\u5408\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\u305d\u306e\u5f8c\u306f\u4eba\u304c\u7d10\u4ed8\u3051\u3092\u884c\u3044\u3001\u5b66\u7fd2\u6a5f\u80fd\u3068\u3057\u3066\u60c5\u5831\u3092\u4fdd\u5b58\u3057\u3001\u6b21\u56de\u306b\u7279\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><span>\u00a0<\/span>InStr\u95a2\u6570\u3001\u305f\u3044\u3078\u3093\u5f79\u306b\u7acb\u3064\u95a2\u6570\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u306b\u304a\u3051\u308bInStr\u95a2\u6570\u306f\u6587\u5b57\u5217\u304b\u3089\u691c\u7d22\u6587\u5b57\u5217\u3092\u63a2\u3057\u51fa\u3059\u3068\u304d\u306b\u4f7f\u3046\u95a2\u6570\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f\u5927\u304d\u304f\uff13\u3064\u306e\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059\u3002\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3092\u300c\u542b\u3080\u300d\u30fb\u300c\u3042\u3044\u307e\u3044\u691c\u7d22\u3059\u308b\u300d\u30fb\u300c\u8907\u6570\u691c\u7d22\u3059\u308b\u300d\u306e\uff13\u3064\u3067\u3059\u3002\u3053\u306e\uff13\u3064\u306e\u7279\u5fb4\u3092InStr [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":1177,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1670"}],"collection":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/comments?post=1670"}],"version-history":[{"count":9,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1670\/revisions"}],"predecessor-version":[{"id":5806,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1670\/revisions\/5806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media\/1177"}],"wp:attachment":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media?parent=1670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/categories?post=1670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}