{"id":2508,"date":"2015-07-09T08:40:18","date_gmt":"2015-07-08T23:40:18","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=2508"},"modified":"2015-07-09T08:40:18","modified_gmt":"2015-07-08T23:40:18","slug":"hiddenrowcolumn","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/hiddenrowcolumn\/","title":{"rendered":"\u884c\u30fb\u5217\u306e\u8868\u793a\u30fb\u975e\u8868\u793a\uff08Hidden \u30d7\u30ed\u30d1\u30c6\u30a3\uff09"},"content":{"rendered":"<h2>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3<\/h2>\n<div class=\"m30-l\">\n<p><strong>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b <strong>True<\/strong> \u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u884c\u307e\u305f\u306f\u5217\uff08<strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\uff09\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\u3002\u307e\u305f\u3001<strong>Falese<\/strong> \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u518d\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>result<\/em> = <em>Object<\/em>.<strong>Hidden<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>Object<\/em>.<strong>Hidden<\/strong> = <em>boolean<\/em><\/p><\/div>\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;\u884c\u307e\u305f\u306f\u5217\u306e\u96c6\u5408\u3068\u306a\u308b <span class=\"red\"><strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n      <strong>Rows \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>Columns \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>\u4efb\u610f\u306e\u30bb\u30eb\u7bc4\u56f2\u306b\u5bfe\u3059\u308b EntireRow \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong> \u4efb\u610f\u306e\u30bb\u30eb\u7bc4\u56f2\u306b\u5bfe\u3059\u308b EntireColumn \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong><\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u975e\u8868\u793a\u306e\u5834\u5408\u3001<strong>True<\/strong>\u3001\u975e\u8868\u793a\u3067\u306a\u3044\u5834\u5408\u3001<strong>False<\/strong><\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Rows \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u307e\u305f\u306f\u3001<strong>Columns \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b\u5f15\u6570\u3092\u6307\u5b9a\u305b\u305a\u306b\u53d6\u5f97\u3057\u305f\u30bb\u30eb\u7bc4\u56f2\u306b\u5bfe\u3057\u3066\u3001<strong>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u5024\u3092 <strong>False<\/strong> \u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001<span class=\"blue\">\u975e\u8868\u793a\u306b\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\u7bc4\u56f2\u3092\u3059\u3079\u3066\u518d\u8868\u793a\u3059\u308b<\/span>\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\uff08\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u7d50\u679c\u306b\u3088\u3063\u3066\u975e\u8868\u793a\u306b\u306a\u3063\u3066\u3044\u308b\u30bb\u30eb\u7bc4\u56f2\u306f\u9664\u304d\u307e\u3059\uff09<\/p>\n<p class=\"caution4\">\u975e\u8868\u793a\u306e\u884c\u307e\u305f\u306f\u5217\u304c\u3042\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u3001<strong>\uff11\u884c\u6bce<\/strong>\u307e\u305f\u306f<strong>\uff11\u5217\u6bce<\/strong>\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\"><strong>\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u7d50\u679c\u306b\u3088\u3063\u3066\u975e\u8868\u793a\u306b\u306a\u3063\u3066\u3044\u308b\u30bb\u30eb\u7bc4\u56f2<\/strong>\u306b\u5bfe\u3057\u3066\u3001<strong>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b <strong>False<\/strong> \u3092\u8a2d\u5b9a\u3057\u3066\u3082\u518d\u8868\u793a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001<strong>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e<strong>\u5024\u3092\u53d6\u5f97<\/strong>\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\uff08<span class=\"blue\">\u30d5\u30a3\u30eb\u30bf\u30fc\u3067\u975e\u8868\u793a\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3082 <strong>True<\/strong> \u3092\u8fd4\u3057\u307e\u3059<\/span>\uff09\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3 \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=\"Hidden \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_Hidden()\r\n\r\n    Dim myRng As Range\r\n    Dim HRowCnt As Long     '\u975e\u8868\u793a\u306e\u884c\u6570\r\n    Dim HColCnt As Long     '\u975e\u8868\u793a\u306e\u5217\u6570\r\n    Dim i As Long\r\n    \r\n    Set myRng = Range(\"A1\").CurrentRegion\r\n\r\n    '\u30d5\u30a3\u30eb\u30bf\u30fc\r\n    myRng.AutoFilter _\r\n        Field:=3, _\r\n        Criteria1:=Array(\"\u7537\"), _\r\n        Operator:=xlFilterValues\r\n\r\n    \r\n    '\u30bb\u30eb\u7bc4\u56f2\u300cA7:C8\u300d\u3092\u542b\u3080\u884c\u3092\u975e\u8868\u793a\u306b\u3059\u308b\r\n    Range(\"A7:C8\").EntireRow.Hidden = True\r\n    \r\n    'B\u5217\u3092\u975e\u8868\u793a\u306b\u3059\u308b\r\n    Columns(2).Hidden = True\r\n    \r\n    '\u975e\u8868\u793a\u306e\u884c\u6570\u3092\u6c42\u3081\u308b\r\n    For i = myRng.Cells(1).Row To myRng.Cells(myRng.Cells.Count).Row\r\n        \r\n        If Rows(i).Hidden = True Then\r\n            \r\n            HRowCnt = HRowCnt + 1\r\n        \r\n        End If\r\n    \r\n    Next i\r\n    \r\n    '\u975e\u8868\u793a\u306e\u5217\u6570\u3092\u6c42\u3081\u308b\r\n    For i = myRng.Cells(1).Column To myRng.Cells(myRng.Cells.Count).Column\r\n    \r\n        If Columns(i).Hidden = True Then\r\n        \r\n            HColCnt = HColCnt + 1\r\n        \r\n        End If\r\n    \r\n    Next i\r\n\r\n    MsgBox \"\u975e\u8868\u793a\u306e\u884c\u6570\uff1a\" & HRowCnt & Chr(13) & _\r\n           \"\u975e\u8868\u793a\u306e\u5217\u6570\uff1a\" & HColCnt\r\n           \r\n\r\nEnd Sub\r\n\u3000\r\n<\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA \u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden012.jpg?ssl=1\" rel=\"lightbox[2508]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden012.jpg?resize=400%2C314&#038;ssl=1\" alt=\"Hidden \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f8b01\" width=\"400\" height=\"314\" class=\"alignnone size-medium wp-image-2516\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden012.jpg?resize=400%2C314&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden012.jpg?w=538&amp;ssl=1 538w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u5b9f\u884c<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden02.jpg?ssl=1\" rel=\"lightbox[2508]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden02.jpg?resize=400%2C312&#038;ssl=1\" alt=\"Hidden \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f8b02\" width=\"400\" height=\"312\" class=\"alignnone size-medium wp-image-2517\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden02.jpg?resize=400%2C312&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden02.jpg?w=540&amp;ssl=1 540w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>Hidden \u30d7\u30ed\u30d1\u30c6\u30a3 Hidden \u30d7\u30ed\u30d1\u30c6\u30a3\u306b True \u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[291,293,292,369,270,290,63,38,269,370],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/hidden012-400x3141.jpg?fit=400%2C314&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Es","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2508"}],"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=2508"}],"version-history":[{"count":7,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2508\/revisions"}],"predecessor-version":[{"id":2539,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2508\/revisions\/2539"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/2540"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=2508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=2508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=2508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}