{"id":3175,"date":"2015-08-23T09:45:40","date_gmt":"2015-08-23T00:45:40","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3175"},"modified":"2015-08-23T09:45:40","modified_gmt":"2015-08-23T00:45:40","slug":"cellobjectfindformatfind","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/cellobjectfindformatfind\/","title":{"rendered":"\u66f8\u5f0f\u3067\u691c\u7d22\uff08Find \u30e1\u30bd\u30c3\u30c9,FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3\uff09"},"content":{"rendered":"<h2>\u66f8\u5f0f\u3067\u691c\u7d22<\/h2>\n<div class=\"m30-l\">\n<p>\u66f8\u5f0f\u3092\u6761\u4ef6\u306b\u30bb\u30eb\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u305d\u306e\u66f8\u5f0f\u6761\u4ef6\u3092 <strong>CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u3001<strong>Find \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u3001\u5f15\u6570 <em>searchformat<\/em> \u306b <strong>True<\/strong> \u3092\u8a2d\u5b9a\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n    <strong>CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e <a href=\"#f-format\">FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3<\/a> \u307e\u305f\u306f\u3001ReplaceFormat \u30d7\u30ed\u30d1\u30c6\u30a3 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n    <strong>CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3067\u3001\u66f8\u5f0f\u6761\u4ef6\u3092\u5b9a\u7fa9\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/rangeborders\/\">Borders \u30d7\u30ed\u30d1\u30c6\u30a3<\/a>\u3001<a href=\"https:\/\/excelwork.info\/excel\/fontsetting\/\">Font \u30d7\u30ed\u30d1\u30c6\u30a3<\/a>\u3001\u307e\u305f\u306f <a href=\"https:\/\/excelwork.info\/excel\/cellinterior\/\">Interior \u30d7\u30ed\u30d1\u30c6\u30a3<\/a> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<h3>Find \u30e1\u30bd\u30c3\u30c9<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Find<\/strong> ( <em>what<\/em> [ <em>searchformat<\/em> ] )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\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>searchformat&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \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 id=\"f-format\">FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>FindFormat<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\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>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u623b\u308a\u5024&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u691c\u7d22\u3059\u308b\u66f8\u5f0f\u3092\u8a2d\u5b9a\u3059\u308b <strong>CellFormat \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3002\uff08CellFormat \u578b\uff09<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>\u6761\u4ef6\u3092\u8a2d\u5b9a\u3059\u308b\u524d\u306b\u521d\u671f\u5316\u3092\u884c\u3046<\/strong><br \/>\n      <strong>FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3067\u3001\u6761\u4ef6\u3092\u8a2d\u5b9a\u3059\u308b\u524d\u306b\u3001<span class=\"red\"><strong>Clear \u30e1\u30bd\u30c3\u30c9<\/strong> \u3092\u4f7f\u3063\u3066\u521d\u671f\u5316\u3092\u3057\u307e\u3059<\/span>\u3002\u3053\u308c\u3092\u3057\u306a\u3044\u3068\u524d\u306b\u8a2d\u5b9a\u3057\u305f\u6761\u4ef6\u304c\u91cd\u306a\u308a\u3001\u610f\u56f3\u3057\u305f\u7d50\u679c\u306b\u306a\u3089\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n      \u3000\u3000<br \/>\n      \u3000\uff08\u4f8b\uff09\u3000<strong>Application<\/strong>.<strong>FindFormat<\/strong>.<strong>Clear<\/strong>\n    <\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u66f8\u5f0f\u3067\u691c\u7d22 \u4f7f\u7528\u4f8b 1<\/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=\"\u66f8\u5f0f\u3067\u691c\u7d22 \u4f7f\u7528\u4f8b 1\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample01_FindFormat()\r\n\r\n    Dim myRng As Range\r\n\r\n    With Application.FindFormat\r\n    \r\n        '\u66f8\u5f0f\u691c\u7d22\u6761\u4ef6\u3092\u521d\u671f\u5316\r\n        .Clear\r\n        \r\n        '\u30bb\u30eb\u80cc\u666f\u8272\u3092\u8a2d\u5b9a\uff08\u9ec4\u8272\uff09\r\n        .Interior.Color = rgbYellow\r\n        \r\n        '\u30d5\u30a9\u30f3\u30c8\u30b9\u30bf\u30a4\u30eb\u306e\u8a2d\u5b9a\uff08\u30a4\u30bf\u30ea\u30c3\u30af\u4f53\uff09\r\n        .Font.Italic = True\r\n\r\n    End With\r\n    \r\n    '\u66f8\u5f0f\u3067\u691c\u7d22\u3001\u5024\u306f\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u6307\u5b9a\r\n    Set myRng = Range(\"A1:D22\").Find(what:=\"*\", searchformat:=True)\r\n    \r\n    If Not myRng Is Nothing Then\r\n    \r\n        MsgBox myRng.Address & \"\uff1a\" & myRng.Value\r\n    \r\n    Else\r\n    \r\n        MsgBox \"\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\"\r\n    \r\n    End If\r\n        \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01.jpg?ssl=1\" rel=\"lightbox[3175]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01.jpg?resize=400%2C306&#038;ssl=1\" alt=\"FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f8b01\" width=\"400\" height=\"306\" class=\"alignnone size-medium wp-image-3177\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01.jpg?resize=400%2C306&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01.jpg?resize=580%2C444&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01.jpg?w=710&amp;ssl=1 710w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n<h2>\u66f8\u5f0f\u3067\u691c\u7d22 \u4f7f\u7528\u4f8b 2<\/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=\"\u66f8\u5f0f\u3067\u691c\u7d22 \u4f7f\u7528\u4f8b 2\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample02_FindFormat()\r\n\r\n    Dim myRng As Range\r\n\r\n    With Application.FindFormat\r\n    \r\n        '\u66f8\u5f0f\u691c\u7d22\u6761\u4ef6\u3092\u521d\u671f\u5316\r\n        .Clear\r\n        \r\n        '\u30d5\u30a9\u30f3\u30c8\u540d\u3092\u8a2d\u5b9a\uff08AR P\u4e38\u30b4\u30b7\u30c3\u30af\u4f53E\uff09\r\n        .Font.Name = \"AR P\u4e38\u30b4\u30b7\u30c3\u30af\u4f53E\"\r\n        \r\n        '\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u306e\u8a2d\u5b9a\uff0814\uff09\r\n        .Font.Size = 14\r\n\r\n    End With\r\n    \r\n    '\u66f8\u5f0f\u3067\u691c\u7d22\u3001\u5024\u306f\u91d1\u984d\r\n    Set myRng = Range(\"A1:D22\").Find(what:=\"\u91d1\u984d\", searchformat:=True)\r\n    \r\n    If Not myRng Is Nothing Then\r\n    \r\n        MsgBox myRng.Address & \"\uff1a\" & myRng.Value\r\n    \r\n    Else\r\n    \r\n        MsgBox \"\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\"\r\n    \r\n    End If\r\n        \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat02.jpg?ssl=1\" rel=\"lightbox[3175]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat02.jpg?resize=400%2C305&#038;ssl=1\" alt=\"FindFormat \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f8b02\" width=\"400\" height=\"305\" class=\"alignnone size-medium wp-image-3178\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat02.jpg?resize=400%2C305&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat02.jpg?resize=580%2C443&amp;ssl=1 580w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat02.jpg?w=711&amp;ssl=1 711w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u66f8\u5f0f\u3067\u691c\u7d22 \u66f8\u5f0f\u3092\u6761\u4ef6\u306b\u30bb\u30eb\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u305d\u306e\u66f8\u5f0f\u6761\u4ef6\u3092 CellFor &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3241,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[515,511,513,270,63,38,269,514],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/cellfindformat01-400x3061.jpg?fit=400%2C306&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Pd","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3175"}],"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=3175"}],"version-history":[{"count":8,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3175\/revisions"}],"predecessor-version":[{"id":3240,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3175\/revisions\/3240"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3241"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}