{"id":2271,"date":"2015-06-15T08:44:06","date_gmt":"2015-06-14T23:44:06","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=2271"},"modified":"2015-06-15T08:44:06","modified_gmt":"2015-06-14T23:44:06","slug":"formulap","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/formulap\/","title":{"rendered":"\u6570\u5f0f\u3092\u8a2d\u5b9a\u30fb\u53d6\u5f97\u3059\u308b\uff08Formula \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbFormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\uff09"},"content":{"rendered":"<h2>Formula \u30d7\u30ed\u30d1\u30c6\u30a3\uff08FormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h2>\n<div class=\"m30-l\">\n<p><strong>Formula \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306f\u3001A1\u5f62\u5f0f\u3067\u3001\u6570\u5f0f\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n    <strong>FormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306f\u3001R1C1\u5f62\u5f0f\u3067\u3001\u6570\u5f0f\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>  <span class=\"red\">\uff1c\u53d6\u5f97\uff1e<\/span><br \/>\n  <em>result<\/em> = <em>Object<\/em>.<strong>Formula<\/strong><\/p>\n<p>  <em>result<\/em> = <em>Object<\/em>.<strong>FormulaR1C1<\/strong><\/p>\n<p>  <span class=\"red\">\uff1c\u8a2d\u5b9a\uff1e<\/span><br \/>\n  <em>Object<\/em>.<strong>Formula<\/strong> = <em>objform<\/em><\/p>\n<p>  <em>Object<\/em>.<strong>FormulaR1C1<\/strong> = <em>objformr1c1<\/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>objform&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;A1\u5f62\u5f0f\u306b\u3088\u308b\u6570\u5f0f\u3092\u8868\u3059\u6587\u5b57\u5217\u3092\u6307\u5b9a<\/li>\n<li>objformr1c1&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;R1C1\u5f62\u5f0f\u306b\u3088\u308b\u6570\u5f0f\u3092\u8868\u3059\u6587\u5b57\u5217\u3092\u6307\u5b9a<\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u53d6\u5f97\u3057\u305f\u6570\u5f0f\u3092\u8868\u3059\u6587\u5b57\u5217\u3084\u5024<\/li>\n<\/ul>\n<br \/><br \/>\n<p class=\"caution4\">\u30bb\u30eb\u306b<strong>\u6570\u5f0f<\/strong>\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u3068\u304d\u306f\u3001<span class=\"blue\">\u7b49\u53f7\uff08=\uff09\u3092\u542b\u3080\u6587\u5b57\u5217<\/span>\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<br \/>\n  \u307e\u305f\u3001\u30bb\u30eb\u306b\u5b9a\u6570\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u3068\u304d\u306f\u3001\u305d\u306e\u5b9a\u6570\u3092\u8fd4\u3057\u3001\u30bb\u30eb\u304c\u7a7a\u306e\u3068\u304d\u306f\u7a7a\u306e\u6587\u5b57\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30bb\u30eb\u306e\u5024\u307e\u305f\u306f\u6570\u5f0f\u306b\u65e5\u4ed8\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u304d\u306b\u66f8\u5f0f\u304c\u8a2d\u5b9a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001<span class=\"blue\">\u6570\u5024\u66f8\u5f0f\u306f\u6a19\u6e96\u306e\u65e5\u4ed8\u306e\u77ed\u3044\u5f62\u5f0f<\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p class=\"caution4\"><strong>\u5bfe\u8c61\u30bb\u30eb\u7bc4\u56f2\u304c 1 \u6b21\u5143\u307e\u305f\u306f 2 \u6b21\u5143\u306e\u30bb\u30eb\u7bc4\u56f2<\/strong>\u306e\u3068\u304d\u306f\u3001\u540c\u3058\u6b21\u5143\u3092\u6301\u3064 Visual Basic \u306e<strong>\u914d\u5217<\/strong>\u304b\u3089\u5404\u30bb\u30eb\u306e\u6570\u5f0f\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u540c\u69d8\u306b\u3001\u5404\u30bb\u30eb\u306e\u6570\u5f0f\u3092 Visual Basic \u306e<strong>\u914d\u5217<\/strong>\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30bb\u30eb\u7bc4\u56f2\u306b\u6570\u5f0f\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u7bc4\u56f2\u5185\u306e\u3059\u3079\u3066\u306e\u30bb\u30eb\u306b\u305d\u306e\u6570\u5f0f\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30bb\u30eb\u306e\u4e2d\u306e\u5024\u3092\u30e6\u30fc\u30b6\u30fc\u304c\u4f7f\u3063\u3066\u3044\u308b\u8a00\u8a9e\u3067\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong>FormulaLocal \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u307e\u305f\u306f\u3001<strong>FormulaR1C1Local \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<br \/><br \/><br \/>\n<h2>Formula \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbFormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\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=\"Formula \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbFormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_Formula()\r\n    \r\n    '\u65e5\u4ed8\u5165\u529b\r\n    Range(\"B1\").Formula = \"=text(today(), \"\"m\u6708dd\u65e5\"\")\"\r\n        \r\n    '\u6570\u5f0f\u5165\u529b\r\n    Dim myArray(1 To 2)\r\n    \r\n    myArray(1) = \"= F4 * 5%\"\r\n    myArray(2) = \"= SUM(F4:G4)\"\r\n    \r\n    Range(\"G4:H8\").Formula = myArray\r\n    \r\n    '\u8868\u793a\r\n    Dim myArray2, myArray3, v, myStr\r\n    \r\n    myArray2 = Range(\"F4:G8\").Formula\r\n    myArray3 = Range(\"H4:H8\").FormulaR1C1\r\n    \r\n    For Each v In myArray2\r\n    \r\n        myStr = myStr & v & Chr(13)\r\n    \r\n    Next v\r\n    \r\n    For Each v In myArray3\r\n    \r\n        myStr = myStr & v & Chr(13)\r\n    \r\n    Next v\r\n    \r\n    MsgBox myStr\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\u30bd\u30fc\u30b9\u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01.jpg?ssl=1\" rel=\"lightbox[2271]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01.jpg?resize=400%2C163&#038;ssl=1\" alt=\"Formula \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbFormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\u3000\u4f8b1\" width=\"400\" height=\"163\" class=\"alignnone size-medium wp-image-2275\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01.jpg?resize=400%2C163&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01.jpg?resize=580%2C236&amp;ssl=1 580w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01.jpg?w=818&amp;ssl=1 818w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula02.jpg?ssl=1\" rel=\"lightbox[2271]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula02.jpg?resize=400%2C191&#038;ssl=1\" alt=\"Formula \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbFormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\u3000\u4f8b2\" width=\"400\" height=\"191\" class=\"alignnone size-medium wp-image-2276\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula02.jpg?resize=400%2C191&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula02.jpg?resize=580%2C277&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula02.jpg?w=966&amp;ssl=1 966w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<br \/><\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>Formula \u30d7\u30ed\u30d1\u30c6\u30a3\uff08FormulaR1C1 \u30d7\u30ed\u30d1\u30c6\u30a3\uff09 Formula &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[324,326,325,327,270,63,38,269,28],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/06\/formula01-400x1631.jpg?fit=400%2C163&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4Ye9i-formulap","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2271"}],"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=2271"}],"version-history":[{"count":5,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2271\/revisions"}],"predecessor-version":[{"id":2291,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2271\/revisions\/2291"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/2292"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=2271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=2271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=2271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}