{"id":2227,"date":"2015-06-09T08:01:28","date_gmt":"2015-06-08T23:01:28","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=2227"},"modified":"2015-08-26T01:19:56","modified_gmt":"2015-08-25T16:19:56","slug":"pastespecialmethod","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/pastespecialmethod\/","title":{"rendered":"\u30bb\u30eb\u306e\u7279\u5b9a\u306e\u8981\u7d20\u306e\u307f\u3092\u30da\u30fc\u30b9\u30c8\u3059\u308b\uff08PasteSpecial \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>PasteSpecial \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>PasteSpecial \u30e1\u30bd\u30c3\u30c9<\/strong>\u306f\u3001<strong>Copy \u30e1\u30bd\u30c3\u30c9<\/strong>\u3067\u30b3\u30d4\u30fc\u3055\u308c\u305f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u4e0a\u306e\u4efb\u610f\u306e\u30bb\u30eb\u30fb\u30bb\u30eb\u7bc4\u56f2\u306e\u5185\u5bb9\u306e\u7279\u5b9a\u306e\u8981\u7d20\u306e\u307f\uff08\u300c\u5024\u306e\u307f\u300d\u300c\u5217\u5e45\u306e\u307f\u300d\u300c\u66f8\u5f0f\u306e\u307f\u300d\u306a\u3069\uff09\u3092\u30da\u30fc\u30b9\u30c8\u3059\u308b\u6642\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>  <em>Object<\/em>.<strong>PasteSpecial<\/strong> ( [ <em>paste<\/em>, <em>operation<\/em>, <em>skipblanks<\/em>, <em>transpose<\/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>\n<li>paste&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8cbc\u308a\u4ed8\u3051\u308b\u8981\u7d20\u3092 <span class=\"blue\"><strong>XlPasteType \u5217\u6319\u578b<\/strong><\/span> \u306e\u5b9a\u6570\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\uff08<a href=\"#xlpastetype\">\u4e0b\u8868\u53c2\u7167<\/a>\uff09<\/li>\n<li>operation&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8a08\u7b97\u3092\u4f34\u3046\u8cbc\u308a\u4ed8\u3051\u306e\u5834\u5408\u306e\u8a08\u7b97\u65b9\u6cd5\u3092 <span class=\"blue\"><strong>XlPasteSpecialOperation<\/strong><\/span> \u306e\u5b9a\u6570\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\uff08<a href=\"#xlpastespecialoperation\">\u4e0b\u8868\u53c2\u7167<\/a>\uff09<\/li>\n<li>skipblanks&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u542b\u307e\u308c\u308b\u7a7a\u767d\u306e\u30bb\u30eb\u3092\u8cbc\u308a\u4ed8\u3051\u306e\u5bfe\u8c61\u306b\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001<strong>True<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u65e2\u5b9a\u5024\u306f <strong>False<\/strong> \u3067\u3059\u3002<\/li>\n<li>transpose&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u884c\u3068\u5217\u3092\u5165\u308c\u66ff\u3048\u3066\u8cbc\u308a\u4ed8\u3051\u308b\u306b\u306f\u3001<strong>True<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u65e2\u5b9a\u5024\u306f <strong>False<\/strong> \u3067\u3059\u3002<\/li>\n<\/ul>\n<br \/><br \/>\n<p class=\"caution4\" id=\"xlpastetype\"><strong>\u5f15\u6570 <em>paste<\/em>\uff08XlPasteType \u5217\u6319\u578b\u306e\u5b9a\u6570\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=\"100\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"300\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteValues<\/td>\n<td width=\"100\" align = \"center\">-4163<\/td>\n<td width=\"300\" >\u5024\u306e\u307f<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteComments<\/td>\n<td width=\"100\" align = \"center\">-4144<\/td>\n<td width=\"300\" >\u30b3\u30e1\u30f3\u30c8\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteFormulas<\/td>\n<td width=\"100\" align = \"center\">-4123<\/td>\n<td width=\"300\" >\u6570\u5f0f\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteFormats<\/td>\n<td width=\"100\" align = \"center\">-4122<\/td>\n<td width=\"300\" >\u30b3\u30d4\u30fc\u3057\u305f\u30bd\u30fc\u30b9\u306e\u5f62\u5f0f\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteAll<\/td>\n<td width=\"100\" align = \"center\">-4104<\/td>\n<td width=\"300\" >\u3059\u3079\u3066\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteValidation<\/td>\n<td width=\"100\" align = \"center\">6<\/td>\n<td width=\"300\" >\u5165\u529b\u898f\u5247\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteAllExceptBorders<\/td>\n<td width=\"100\" align = \"center\">7<\/td>\n<td width=\"300\" >\u8f2a\u90ed\u4ee5\u5916\u306e\u3059\u3079\u3066\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteColumnWidths<\/td>\n<td width=\"100\" align = \"center\">8<\/td>\n<td width=\"300\" >\u30b3\u30d4\u30fc\u3057\u305f\u5217\u306e\u5e45\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteFormulasAndNumberFormats<\/td>\n<td width=\"100\" align = \"center\">11<\/td>\n<td width=\"300\" >\u6570\u5f0f\u3068\u6570\u5024\u306e\u66f8\u5f0f\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteValuesAndNumberFormats<\/td>\n<td width=\"100\" align = \"center\">12<\/td>\n<td width=\"300\" >\u5024\u3068\u6570\u5024\u306e\u66f8\u5f0f\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteAllUsingSourceTheme<\/td>\n<td width=\"100\" align = \"center\">13<\/td>\n<td width=\"300\" >\u30bd\u30fc\u30b9\u306e\u30c6\u30fc\u30de\u3092\u4f7f\u7528\u3057\u3066\u3059\u3079\u3066\u3092\u8cbc\u308a\u4ed8\u3051<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteAllMergingConditionalFormats<\/td>\n<td width=\"100\" align = \"center\">14<\/td>\n<td width=\"300\" >\u3059\u3079\u3066\u3092\u8cbc\u308a\u4ed8\u3051\u3001\u6761\u4ef6\u4ed8\u304d\u66f8\u5f0f\u3092\u30de\u30fc\u30b8<\/td>\n<\/tr>\n<\/table>\n<br \/><br \/>\n<p class=\"caution4\" id=\"xlpastespecialoperation\"><strong>\u5f15\u6570 <em>operation<\/em>\uff08XlPasteSpecialOperation\u306e\u5b9a\u6570\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=\"100\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"300\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteSpecialOperationNone<\/td>\n<td width=\"100\" align = \"center\">-4142<\/td>\n<td width=\"300\" >\u8a08\u7b97\u306f\u884c\u308f\u308c\u306a\u3044<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteSpecialOperationAdd<\/td>\n<td width=\"100\" align = \"center\">2<\/td>\n<td width=\"300\" >\u52a0\u7b97<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteSpecialOperationSubtract<\/td>\n<td width=\"100\" align = \"center\">3<\/td>\n<td width=\"300\" >\u6e1b\u7b97<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteSpecialOperationMultiply<\/td>\n<td width=\"100\" align = \"center\">4<\/td>\n<td width=\"300\" >\u4e57\u7b97<\/td>\n<\/tr>\n<tr>\n<td width=\"250\" >xlPasteSpecialOperationDivide<\/td>\n<td width=\"100\" align = \"center\">5<\/td>\n<td width=\"300\" >\u9664\u7b97<\/td>\n<\/tr>\n<\/table>\n<br \/><br \/>\n<p class=\"caution4\">\u5f15\u6570 <em>paste<\/em> \u306b\u306f\uff11\u3064\u306e\u8981\u7d20\u3057\u304b\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u8907\u6570\u306e\u8981\u7d20\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u305d\u306e\u8981\u7d20\u3054\u3068\u306b\u3001<strong>PasteSpecial \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n\uff08\u4f8b\uff09\u5217\u5e45\u3068\u66f8\u5f0f\u3092\u30da\u30fc\u30b9\u30c8<br \/>\n  \u3000Range(&#8220;A1&#8221;).copy<br \/>\n  \u3000Range(&#8220;B1&#8221;).PasteSpecial xlPasteColumnWidths<br \/>\n  \u3000Range(&#8220;B1&#8221;).PasteSpecial xlPasteFormats\n<\/p>\n<br \/>\n<p class=\"caution4\"><span class=\"blue\">\u66f8\u5f0f\u304c\u6587\u5b57\u5217\u3067\u3042\u3063\u305f\u308a\u3001\u5148\u982d\u306b\u300c&#8217;\u300d\u30b7\u30f3\u30b0\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u30de\u30fc\u30af\u304c\u3064\u3044\u305f\u6570\u5024\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb<\/span>\u306b\u5bfe\u3057\u3066\u3001\u300c<strong>\u7a7a\u767d\u30bb\u30eb<\/strong>\u300d\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001<span class=\"red\"><strong>PasteSpecial \u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3067\u3001\u5f15\u6570 <em>operation<\/em> \u306b\u3001<strong>xlPasteSpecialOperationAdd<\/strong> \u3092\u6307\u5b9a\u3057\u3066\u305d\u306e\u6570\u5024\u304c\u5165\u529b\u3055\u308c\u305f\u30bb\u30eb\u306b\u30da\u30fc\u30b9\u30c8\u3059\u308b\u3068\u3001\u6a19\u6e96\u306e\u66f8\u5f0f\u306b\u5909\u66f4\u3055\u308c\u3001\u300c&#8217;\u300d\u30b7\u30f3\u30b0\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u30de\u30fc\u30af\u3082\u53d6\u308a\u9664\u304b\u308c\u307e\u3059\u3002<\/p>\n<\/div>\n<br \/>\n<h2>PasteSpecial \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=\"PasteSpecial \u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_PasteSpecial()\r\n\r\n    '\u300cA1\u300d\u30bb\u30eb\u304b\u3089\u300cE1\u300d\u30bb\u30eb\u3092\u30b3\u30d4\u30fc\r\n    Range(\"A1:E1\").Copy\r\n    \r\n    '\u300cA3\u300d\u30bb\u30eb\u3078\u30da\u30fc\u30b9\u30c8\uff08\u300c\u5024\u306e\u307f\u300d\u300c\u7a7a\u767d\u30bb\u30eb\u5bfe\u8c61\u5916\u300d\u300c\u884c\u5217\u5165\u308c\u66ff\u3048\u308b\u300d\uff09\r\n    Range(\"A3\").PasteSpecial , _\r\n        Paste:=xlPasteValues, _\r\n        skipblanks:=True, _\r\n        Transpose:=True\r\n    \r\n    \r\n    '\u300cG1:H1\u300d\u30bb\u30eb\u306f\u3001\u30b7\u30f3\u30b0\u30eb\u30b3\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff08'\uff09\u304c\u4ed8\u3044\u305f\u6570\u5024\uff08\u6587\u5b57\u5217\uff09\r\n    '\u300cI1\u300d\u30bb\u30eb\u306f\u3001\u66f8\u5f0f\u304c\u6587\u5b57\u5217\r\n    '\u300cM1\u300d\u30bb\u30eb\u306f\u7a7a\u767d\u30bb\u30eb\r\n    \r\n    '\u300cM1\u300d\u30bb\u30eb\u3092\u30b3\u30d4\u30fc\r\n    Range(\"M1\").Copy\r\n    \r\n    '\u300cA10\u300d\u30bb\u30eb\u3078\u30da\u30fc\u30b9\u30c8\uff08\u300c\u5168\u3066\u300d\u3001\u300c\u52a0\u7b97\u3057\u3066\u8cbc\u308a\u4ed8\u3051\u300d\uff09\r\n    Range(\"G1:L1\").PasteSpecial , xlPasteSpecialOperationAdd\r\n    \r\n    \r\n    '\u300cG1\u300d\u30bb\u30eb\u304b\u3089\u300cL1\u300d\u30bb\u30eb\u3092\u30b3\u30d4\u30fc\r\n    Range(\"G1:L1\").Copy\r\n    \r\n    '\u300cG10\u300d\u30bb\u30eb\u304b\u3089\u300cL10\u300d\u3078\u30da\u30fc\u30b9\u30c8\uff08\u300c\u6e1b\u7b97\u3057\u3066\u8cbc\u308a\u4ed8\u3051\u300d\uff09\r\n    Range(\"G10:L10\").PasteSpecial operation:=3\r\n            \r\n    '\u300cG11\u300d\u30bb\u30eb\u3078\u30da\u30fc\u30b9\u30c8\uff08\u300c\u5024\u300d\u300c\u6570\u5024\u6570\u5f0f\u306e\u66f8\u5f0f\u300d\uff09\r\n    Range(\"G11\").PasteSpecial Paste:=xlPasteValues\r\n    Range(\"G11\").PasteSpecial Paste:=xlPasteFormulasAndNumberFormats\r\n    \r\n    \r\n    '\u30b3\u30d4\u30fc\u30e2\u30fc\u30c9\u89e3\u9664\r\n    Application.CutCopyMode = False\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:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01.jpg?ssl=1\" rel=\"lightbox[2227]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01.jpg?resize=400%2C109&#038;ssl=1\" alt=\"PasteSpecial \u30e1\u30bd\u30c3\u30c9\uff10\uff11\" width=\"400\" height=\"109\" class=\"alignnone size-medium wp-image-2234\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01.jpg?resize=400%2C109&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01.jpg?resize=580%2C158&amp;ssl=1 580w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01.jpg?w=982&amp;ssl=1 982w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial02.jpg?ssl=1\" rel=\"lightbox[2227]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial02.jpg?resize=400%2C109&#038;ssl=1\" alt=\"PasteSpecial \u30e1\u30bd\u30c3\u30c9\uff10\uff12\" width=\"400\" height=\"109\" class=\"alignnone size-medium wp-image-2235\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial02.jpg?resize=400%2C109&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial02.jpg?resize=580%2C158&amp;ssl=1 580w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial02.jpg?w=978&amp;ssl=1 978w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<br \/><\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>PasteSpecial \u30e1\u30bd\u30c3\u30c9 PasteSpecial \u30e1\u30bd\u30c3\u30c9\u306f\u3001Cop &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2240,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[315,270,63,38,269,312,313],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/pastespecial01-400x1091.jpg?fit=400%2C109&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-zV","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2227"}],"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=2227"}],"version-history":[{"count":12,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2227\/revisions"}],"predecessor-version":[{"id":3361,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2227\/revisions\/3361"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/2240"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=2227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=2227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=2227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}