{"id":2381,"date":"2015-06-26T10:12:57","date_gmt":"2015-06-26T01:12:57","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=2381"},"modified":"2015-08-26T01:09:17","modified_gmt":"2015-08-25T16:09:17","slug":"specialcells","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/specialcells\/","title":{"rendered":"\u6307\u5b9a\u3057\u305f\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u30bb\u30eb\u3092\u53d6\u5f97\uff08SpecialCells \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>SpecialCells \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>SpecialCells \u30e1\u30bd\u30c3\u30c9<\/strong>\u306f\u3001\u6307\u5b9a\u3057\u305f\u6761\u4ef6\uff08<strong>XlCellType \u5217\u6319\u578b<\/strong>\uff09\u306b\u4e00\u81f4\u3059\u308b\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092 <span class=\"red\"><strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\uff09\u3067\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>  <em>result<\/em> = <em>Object<\/em>.<strong>SpecialCells<\/strong> ( <em>type<\/em> [, <em>value<\/em> ] )<\/p>\n<\/div>\n<br \/>\n<h3>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\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><\/li>\n<li>type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u53d6\u5f97\u3059\u308b\u30bb\u30eb\u306e\u7a2e\u985e\u3092\u6307\u5b9a\u3057\u307e\u3059\uff08<strong>XlCellType \u5217\u6319\u578b<\/strong>\uff09\u3002<br \/>\n\u3000\u21d2\u3000<a href=\"#XlCellType\">\u5f15\u6570 <em>type<\/em> \u306b\u6307\u5b9a\u3059\u308b\u5024\uff08XlCellType \u5217\u6319\u578b\uff09<\/a> \u3092\u53c2\u7167<\/li>\n<li>value&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5f15\u6570 <em>type<\/em> \u306b <strong>xlCellTypeConstants<\/strong> \u307e\u305f\u306f <strong>xlCellTypeFormulas<\/strong> \u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u306e\u307f <strong>XlSpecialCellsValue \u5217\u6319\u578b<\/strong>\u306e\u5b9a\u6570\uff08\u5024\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3088\u308a\u7d30\u304b\u306a\u5f62\u5f0f\u306e\u6307\u5b9a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u7701\u7565\u3059\u308b\u3068\u3059\u3079\u3066\u306e\u9805\u76ee\u304c\u5bfe\u8c61\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3000\u21d2\u3000<a href=\"#XlSpecialCellsValue\">\u5f15\u6570 <em>value<\/em> \u306b\u6307\u5b9a\u3059\u308b\u5024\uff08XlSpecialCellsValue \u5217\u6319\u578b\uff09<\/a> \u3092\u53c2\u7167<\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30bb\u30eb\uff08<strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\uff09\u3002<\/li>\n<\/ul>\n<br \/><br \/>\n<p class=\"caution4\" id=\"XlCellType\"><strong>\u5f15\u6570 <em>type<\/em> \u306b\u6307\u5b9a\u3059\u308b\u5024\uff08XlCellType \u5217\u6319\u578b\uff09<\/strong><\/p>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeConstants<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u5b9a\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeBlanks<\/td>\n<td width=\"80\" align = \"center\">4<\/td>\n<td width=\"320\" >\u7a7a\u767d\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeLastCell<\/td>\n<td width=\"80\" align = \"center\">11<\/td>\n<td width=\"320\" >\u4f7f\u308f\u308c\u305f\u30bb\u30eb\u7bc4\u56f2\u5185\u306e\u6700\u5f8c\u306e\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeVisible<\/td>\n<td width=\"80\" align = \"center\">12<\/td>\n<td width=\"320\" >\u3059\u3079\u3066\u306e\u53ef\u8996\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeFormulas<\/td>\n<td width=\"80\" align = \"center\">-4123<\/td>\n<td width=\"320\" >\u6570\u5f0f\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeComments<\/td>\n<td width=\"80\" align = \"center\">-4144<\/td>\n<td width=\"320\" >\u30b3\u30e1\u30f3\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30bb\u30eb<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeAllFormatConditions<\/td>\n<td width=\"80\" align = \"center\">-4172<\/td>\n<td width=\"320\" >\u8868\u793a\u5f62\u5f0f\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb<br \/>\n\uff08\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeSameFormatConditions<\/td>\n<td width=\"80\" align = \"center\">-4173<\/td>\n<td width=\"320\" >\u540c\u3058\u8868\u793a\u5f62\u5f0f\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb<br \/>\n\uff08\u7279\u5b9a\u306e\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u3068\u3001\u540c\u3058\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeAllValidation<\/td>\n<td width=\"80\" align = \"center\">-4174<\/td>\n<td width=\"320\" >\u6761\u4ef6\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30bb\u30eb<br \/>\n\uff08\u5165\u529b\u898f\u5247\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlCellTypeSameValidation<\/td>\n<td width=\"80\" align = \"center\">-4175<\/td>\n<td width=\"320\" >\u540c\u3058\u6761\u4ef6\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30bb\u30eb<\/td>\n<\/tr>\n<\/table>\n<br \/><br \/>\n<p class=\"caution4\" id=\"XlSpecialCellsValue\"><strong>\u5f15\u6570 <em>value<\/em> \u306b\u6307\u5b9a\u3059\u308b\u5024\uff08XlSpecialCellsValue \u5217\u6319\u578b\uff09<\/strong><\/p>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlNumbers<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u6570\u5024<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlTextValues<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u6587\u5b57<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlLogical<\/td>\n<td width=\"80\" align = \"center\">4<\/td>\n<td width=\"320\" >\u8ad6\u7406\u5024<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlErrors<\/td>\n<td width=\"80\" align = \"center\">16<\/td>\n<td width=\"320\" >\u30a8\u30e9\u30fc\u5024<\/td>\n<\/tr>\n<\/table>\n<br \/><br \/>\n<p class=\"caution4\"><strong>\u5f15\u6570 <em>value<\/em><\/strong> \u306b\u3001\u8907\u6570\u306e\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u3059\u308b\u3068\u304d\u306f\u3001<span class=\"red\"><strong>\u5408\u8a08\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/strong><\/span><br \/>\n  \uff08\u4f8b\uff09<strong>Range(&#8220;A1:C5&#8221;).xlCellTypeFormulas( xlNumbers + xlTextValues )<\/strong><\/p>\n<br \/>\n<p class=\"caution4\"><strong>SpecialCells \u30e1\u30bd\u30c3\u30c9<\/strong> \u3067\u5f97\u3089\u308c\u308b\u300c\u6700\u5f8c\u306e\u30bb\u30eb\u300d<strong>SpecialCells(xlCellTypeLastCell)<\/strong> \u306f\u3001\u30d6\u30c3\u30af\u3092\u4fdd\u5b58\u3057\u306a\u3044\u3068\u518d\u8a08\u7b97\u3055\u308c\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>SpecialCells \u30e1\u30bd\u30c3\u30c9\u306e\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=\"SpecialCells \u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_SpecialCells()\r\n\r\n\r\n    '\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3089\u7121\u8996\u3057\u3066\u6b21\u3078\u9032\u3080\r\n    On Error Resume Next\r\n    \r\n    '\u7a7a\u767d\u30bb\u30eb\u306e\u30a2\u30c9\u30ec\u30b9\r\n    Debug.Print \"\u7a7a\u767d\uff1a\" & Range(\"\u58f2\u4e0a\u886801\").SpecialCells(xlCellTypeBlanks).Address\r\n\r\n    '\u6570\u5f0f\u30bb\u30eb\uff08\u6570\u5024\uff09\r\n    Debug.Print \"\u6570\u5024\uff1a\" & Range(\"\u58f2\u4e0a\u886801\").SpecialCells(xlCellTypeFormulas, xlNumbers).Address\r\n    \r\n    '\u6570\u5f0f\u30bb\u30eb\uff08\u6587\u5b57\uff09\r\n    Debug.Print \"\u6587\u5b57\uff1a\" & Range(\"\u58f2\u4e0a\u886801\").SpecialCells(xlCellTypeFormulas, 2).Address\r\n\r\n    '\u6570\u5f0f\u30bb\u30eb\uff08\u6587\u5b57\u3001\u6570\u5024\uff09\r\n    Debug.Print \"\u6570\u5f0f\uff1a\" & Range(\"\u58f2\u4e0a\u886801\").SpecialCells(xlCellTypeFormulas, 1 + 2).Address\r\n\r\n    '\u6761\u4ef6\u5f0f\u66f8\u5f0f\uff08\u8a2d\u5b9a\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u30a8\u30e9\u30fc\u3068\u306a\u308b\uff09\r\n    Debug.Print \"\u6761\u4ef6\uff1a\" & Cells.SpecialCells(xlCellTypeAllFormatConditions).Address\r\n        \r\n    '\u6700\u7d42\u30bb\u30eb\uff08\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\u306e\u6700\u3082\u53f3\u4e0b\u306e\u30bb\u30eb\uff09\r\n    Debug.Print \"\u6700\u7d42\uff1a\" & Cells.SpecialCells(xlCellTypeLastCell).Address\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:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01.jpg?ssl=1\" rel=\"lightbox[2381]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01.jpg?resize=400%2C197&#038;ssl=1\" alt=\"SpecialCells \u30e1\u30bd\u30c3\u30c9 \u4f8b\" width=\"400\" height=\"197\" class=\"alignnone size-medium wp-image-2387\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01.jpg?resize=400%2C197&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01.jpg?resize=580%2C285&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01.jpg?w=991&amp;ssl=1 991w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<br \/><\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>SpecialCells \u30e1\u30bd\u30c3\u30c9 SpecialCells \u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6307\u5b9a\u3057 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2395,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[270,348,63,38,269],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/specialcells01-400x1971.jpg?fit=400%2C197&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Cp","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2381"}],"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=2381"}],"version-history":[{"count":13,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":3356,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2381\/revisions\/3356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/2395"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}