{"id":3166,"date":"2015-08-22T15:31:43","date_gmt":"2015-08-22T06:31:43","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3166"},"modified":"2015-08-22T15:31:43","modified_gmt":"2015-08-22T06:31:43","slug":"findwildcard","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/findwildcard\/","title":{"rendered":"\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u691c\u7d22\uff08Find \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>Find \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p>\u6307\u5b9a\u3057\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u7279\u5b9a\u306e\u60c5\u5831\u3092\u542b\u3080\u30bb\u30eb\u3092\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Find<\/strong> ( <em>what<\/em> [, <em>after<\/em>, <em>lookin<\/em>, <em>lookat<\/em>, <em>searchorder<\/em>, <em>searchdirection<\/em>, <em>matchcase<\/em>, <em>matchbyte<\/em>, <em>searchformat<\/em> ] )<\/p><\/div>\n<br \/>\n<h3>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>what&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217\u3001\u5024\u306a\u3069\u3001\u30bb\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u306b\u8a72\u5f53\u3059\u308b\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u7701\u7565\u4e0d\u53ef\u3002<\/li>\n<li>after&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<em>object<\/em> \u3067\u6307\u5b9a\u3057\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u30bb\u30eb\u306e\uff11\u3064\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<span class=\"red\">\u3053\u306e\u30bb\u30eb\u306e\u6b21\u306e\u30bb\u30eb\u304b\u3089\u691c\u7d22\u304c\u958b\u59cb\u3055\u308c\u307e\u3059\u3002<\/span>\u3053\u306e\u30bb\u30eb\u81ea\u4f53\u306f\u3001\u6307\u5b9a\u7bc4\u56f2\u5168\u4f53\u3092\u691c\u7d22\u3057\u623b\u3063\u3066\u304f\u308b\u307e\u3067\u306f\u691c\u7d22\u3055\u308c\u307e\u305b\u3093\u3002\u7701\u7565\u3059\u308b\u3068\u3001\u5bfe\u8c61\u306e\u30bb\u30eb\u7bc4\u56f2\u5de6\u4e0a\u7aef\u30bb\u30eb\u304c\u691c\u7d22\u958b\u59cb\u70b9\u3068\u306a\u308a\u307e\u3059\u3002<\/li>\n<li>lookin&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u5bfe\u8c61\u3068\u306a\u308b\u5b9a\u6570 <strong>xlComments<\/strong>\uff08\u30b3\u30e1\u30f3\u30c8\uff09\u3001<strong>xlFormulas<\/strong>\uff08\u6570\u5f0f\uff09\u3001<strong>xlValues<\/strong>\uff08\u5024\uff09\u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>lookat&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u6761\u4ef6\u3092\u8868\u3059\u5b9a\u6570 <strong>xlWhole<\/strong>\uff08\u5b8c\u5168\u4e00\u81f4\u306e\u30bb\u30eb\u3092\u691c\u7d22\uff09\u3001<strong>xlPart<\/strong>\uff08\u691c\u7d22\u6587\u5b57\u5217\u3092\u542b\u3080\u30bb\u30eb\u3092\u691c\u7d22\uff09\u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>searchorder&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u6642\u306b\u884c\u5217\u3069\u3061\u3089\u3092\u512a\u5148\u3057\u3066\u691c\u7d22\u3059\u308b\u304b\u3092\u8868\u3059\u5b9a\u6570 <strong>xlByRows<\/strong>\uff08\u884c\u512a\u5148\uff09\u3001<strong>xlByColumns<\/strong>\uff08\u5217\u512a\u5148\uff09\u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>searchdirection&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u65b9\u5411\u3092\u8868\u3059\u5b9a\u6570 <strong>xlNext<\/strong>\uff08\u5f8c\u65b9\u691c\u7d22\uff09\u3001<strong>xlPrevious<\/strong>\uff08\u524d\u65b9\u691c\u7d22\uff09\u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>matchcase&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3059\u308b\u5834\u5408\u306f\u3001<strong>True<\/strong> \u3092\u3001\u3057\u306a\u3044\u5834\u5408\u306f <strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u65e2\u5b9a\u5024\u306f\u3001<strong>False<\/strong> \u3067\u3059\u3002<\/li>\n<li>matchbyte&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u534a\u89d2\u6587\u5b57\u3001\u5168\u89d2\u6587\u5b57\u3092\u533a\u5225\u3059\u308b\u5834\u5408\u306f\u3001<strong>True<\/strong> \u3092\u3001\u3057\u306a\u3044\u5834\u5408\u306f <strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u65e2\u5b9a\u5024\u306f\u3001<strong>False<\/strong> \u3067\u3059\u3002<\/li>\n<li>searchformat&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<a href=\"https:\/\/excelwork.info\/excel\/vba_glossary\/#cellformat-object\">CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/a> \u306b\u8a2d\u5b9a\u3055\u308c\u305f\u66f8\u5f0f\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001<strong>True<\/strong> \u3092\u3001\u3057\u306a\u3044\u5834\u5408\u306f\u3001<strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u65e2\u5b9a\u5024\u306f\u3001<strong>False<\/strong> \u3067\u3059\u3002<\/li>\n<li>\u623b\u308a\u5024&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u306e\u7d50\u679c\u3001\u6761\u4ef6\u3092\u6e80\u305f\u3059\u30bb\u30eb\u304c\u898b\u3064\u304b\u3063\u305f\u3089\u305d\u306e\u5148\u982d\u306e\u30bb\u30eb\u3092\u8868\u3059 <strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3092\u8fd4\u3057\u307e\u3059\u3002\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u3001<strong>Nothing<\/strong> \u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/><\/div>\n<br \/>\n<h3>\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9<\/h3>\n<div class=\"m30-l\">\n<p>\u5f15\u6570 <em>what<\/em> \u306b\u306f\u3001\u4ee5\u4e0b\u306e<strong>\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9<\/strong>\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<td width=\"250\" align = \"center\">?<\/td>\n<td width=\"320\" >\u4efb\u610f\u306e\uff11\u6587\u5b57<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" align = \"center\">*<\/td>\n<td width=\"320\" >\u4efb\u610f\u306e\u6587\u5b57\u5217<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<br \/><br \/>\n<h2>Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08?\uff09\u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08?\uff09\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample01_Find_Wildcard()\r\n\r\n    Dim myRng As Range\r\n    Dim firstCell As Range\r\n    Dim str As String\r\n    \r\n    Set myRng = Cells.Find(what:=\"??\u4ee3\", LookAt:=xlWhole)\r\n    \r\n    If myRng Is Nothing Then\r\n        MsgBox \"Nothing\"\r\n        Exit Sub\r\n    Else\r\n        Set firstCell = myRng\r\n    End If\r\n    \r\n    Do\r\n    \r\n        str = str & myRng.Value & vbLf\r\n        \r\n        Set myRng = Cells.FindNext(myRng)\r\n        \r\n        If firstCell.Address = myRng.Address Then Exit Do\r\n\r\n    Loop\r\n    \r\n    MsgBox str\r\n \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08?\uff09\u4f7f\u7528\u4f8b \u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02.jpg?ssl=1\" rel=\"lightbox[3166]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02.jpg?resize=400%2C296&#038;ssl=1\" alt=\"Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9 \u4f7f\u7528\u4f8b02\" width=\"400\" height=\"296\" class=\"alignnone size-medium wp-image-3170\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02.jpg?resize=400%2C296&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02.jpg?resize=580%2C430&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02.jpg?w=713&amp;ssl=1 713w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n<h2>Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08*\uff09\u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08*\uff09\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample02_Find_Wildcard()\r\n\r\n    Dim myRng As Range\r\n    Dim firstCell As Range\r\n    Dim str As String\r\n    \r\n    Set myRng = Cells.Find(what:=\"*\u8cbb\", LookAt:=xlWhole)\r\n    \r\n    If myRng Is Nothing Then\r\n        MsgBox \"Nothing\"\r\n        Exit Sub\r\n    Else\r\n        Set firstCell = myRng\r\n    End If\r\n    \r\n    Do\r\n    \r\n        str = str & myRng.Value & vbLf\r\n        \r\n        Set myRng = Cells.FindNext(myRng)\r\n        \r\n        If firstCell.Address = myRng.Address Then Exit Do\r\n\r\n    Loop\r\n    \r\n    MsgBox str\r\n \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08*\uff09\u4f7f\u7528\u4f8b \u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard03.jpg?ssl=1\" rel=\"lightbox[3166]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard03.jpg?resize=400%2C294&#038;ssl=1\" alt=\"Find \u30e1\u30bd\u30c3\u30c9 \u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9 \u4f7f\u7528\u4f8b02\" width=\"400\" height=\"294\" class=\"alignnone size-medium wp-image-3171\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard03.jpg?resize=400%2C294&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard03.jpg?resize=580%2C426&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard03.jpg?w=714&amp;ssl=1 714w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>Find \u30e1\u30bd\u30c3\u30c9 \u6307\u5b9a\u3057\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u7279\u5b9a\u306e\u60c5\u5831\u3092\u542b\u3080\u30bb\u30eb\u3092\u691c\u7d22\u3057\u307e\u3059\u3002 \u3010\u66f8 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[511,270,63,38,269,512],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindwildcard02-400x2961.jpg?fit=400%2C296&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-P4","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3166"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=3166"}],"version-history":[{"count":6,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3166\/revisions"}],"predecessor-version":[{"id":3233,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3166\/revisions\/3233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3234"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}