{"id":1871,"date":"2015-05-16T09:50:38","date_gmt":"2015-05-16T00:50:38","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=1871"},"modified":"2015-05-16T09:50:38","modified_gmt":"2015-05-16T00:50:38","slug":"funcval","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/funcval\/","title":{"rendered":"\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u5909\u63db\u3059\u308b\uff08Val \u95a2\u6570\uff09"},"content":{"rendered":"<h2>Val \u95a2\u6570 \u306e\u4f7f\u3044\u65b9<\/h2>\n<br \/>\n<div class=\"m30-l\">\n<p><strong>Val \u95a2\u6570<\/strong>\u306f\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u306b\u542b\u307e\u308c\u308b\u6570\u5b57\u3092\u6570\u5024\u3068\u3057\u3066\u8a8d\u8b58\u3057\u3001\u305d\u306e\u5024\u3092\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u306b\u5909\u63db\u3057\u3066\u304b\u3048\u3059\u95a2\u6570\u3067\u3059\u3002<\/p>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p><em>result<\/em> = <strong>Val<\/strong> ( <em>expression<\/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>expression&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4efb\u610f\u306e\u6587\u5b57\u5217\u30fb\u6587\u5b57\u5217\u5f0f\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5f15\u6570 <em>expression<\/em> \u306b\u542b\u307e\u308c\u308b\u6570\u5024\u3092\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u306b\u5909\u63db\u3057\u305f\u5024\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\">\u6587\u5b57\u5217\u4e2d\u306e\u6570\u5b57\u4ee5\u5916\u306e\u6587\u5b57\u3092\u898b\u3064\u3051\u308b\u3068 <strong>Val \u95a2\u6570<\/strong>\u306f\u8aad\u307f\u8fbc\u307f\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001<span class=\"blue\">\u30b9\u30da\u30fc\u30b9\u3001\u30bf\u30d6\u3001\u30e9\u30a4\u30f3\u30d5\u30a3\u30fc\u30c9\u3001\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\u7b49\u306f\u7121\u8996<\/span>\u3055\u308c\u307e\u3059\u3002<br \/>\n\u4f8b1\uff1a<span class=\"red\">Val(&#8220;12   345&#8221;) \u21d2 12345\uff08[\u30b9\u30da\u30fc\u30b9]\u306f\u7121\u8996\uff09<\/span><br \/>\n\u4f8b2\uff1a<span class=\"red\">Val(&#8220;99\\123&#8221;) \u21d2 99\uff08[\\]\u4ee5\u964d\u306f\u8aad\u307f\u8fbc\u307f\u4e2d\u6b62\uff09<\/span>\n<\/p>\n<p class=\"caution4\">8 \u9032\u6570\u3092\u8868\u3059 <strong>&#038;O<\/strong> \u3084 16 \u9032\u6570\u3092\u8868\u3059 <strong>&#038;H<\/strong> \u306f\u3001\u6570\u5024\u3068\u3057\u3066\u8a8d\u8b58\u3057\u307e\u3059\u3002<br \/>\n\u4f8b\uff1a<span class=\"red\">Val(&#8220;&#038;H10&#8221;) \u21d2 16, Val(&#8220;&#038;O10&#8221;) \u21d2 8<\/span> \uff09\n<\/p>\n<p class=\"caution4\">\u30d4\u30ea\u30aa\u30c9 (.) \u306f\u3001\u5c0f\u6570\u70b9\u306e\u8a18\u53f7\u3068\u3057\u3066\u8a8d\u8b58\u3057\u307e\u3059\u3002<br \/>\n\u4f8b\uff1a<span class=\"red\">Val(&#8220;123.55&#8221;) \u21d2 123.55<\/span>\n<\/p>\n<p class=\"caution4\">\u5f15\u6570 <em>expression<\/em> \u304c\u3001<strong>Null \u5024<\/strong>\u306e\u5834\u5408\u306f\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<p class=\"caution4\">\u5f15\u6570 <em>expression<\/em> \u304c\u3001<strong>Empty \u5024<\/strong>\u306e\u5834\u5408\u306f\u3001<strong>0<\/strong> \u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>Val \u95a2\u6570 \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=\"Val \u95a2\u6570\u306e\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_val()\r\n\r\n\r\n    Debug.Print Val(123456)                  '\u6570\u5024\r\n    \r\n    Debug.Print Val(\"9\\12\")                  '\u300c\\\u300d\u3092\u542b\u3080\r\n\r\n    Debug.Print Val(\"&H10\")                  '16\u9032\u6570\r\n    \r\n    Debug.Print Val(\"&O10\")                  '8\u9032\u6570\r\n\r\n    Debug.Print Val(\"\uff11\uff12\uff13abc\")             '\u5168\u89d2\u6570\u5024\u3068\u6587\u5b57\u5217\r\n    \r\n    Debug.Print Val(\"123abc\")                '\u534a\u89d2\u6570\u5024\u3068\u6587\u5b57\u5217\r\n\r\n    Debug.Print Val(\"25.1\")                  '\u5c0f\u6570\u70b9\u3092\u542b\u3080\u6570\u5024\r\n\r\n    Debug.Print Val(50 & Chr(9) & \"11\")      '\u6c34\u5e73\u30bf\u30d6\r\n\r\n    Debug.Print Val(60 & Chr(10) & 1)        '\u30e9\u30a4\u30f3\u30d5\u30a3\u30fc\u30c9\r\n    \r\n    Debug.Print Val(70 & Chr(11) & 1)        '\u5782\u76f4\u30bf\u30d6\r\n\r\n    Debug.Print Val(80 & Chr(13) & 1)        '\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\r\n\r\n    Debug.Print Val(90 & Chr(32) & 1)        '\u30b9\u30da\u30fc\u30b9\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\/05\/val01.jpg?ssl=1\" rel=\"lightbox[1871]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/val01.jpg?resize=400%2C384&#038;ssl=1\" alt=\"Val \u95a2\u6570\u3000\u4f8b\" width=\"400\" height=\"384\" class=\"alignnone size-medium wp-image-1875\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/val01.jpg?resize=400%2C384&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/val01.jpg?resize=580%2C556&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/val01.jpg?w=684&amp;ssl=1 684w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<br \/><\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>Val \u95a2\u6570 \u306e\u4f7f\u3044\u65b9 Val \u95a2\u6570\u306f\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u306b\u542b\u307e\u308c\u308b\u6570\u5b57\u3092\u6570\u5024\u3068\u3057\u3066 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":1909,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[37],"tags":[243,63,38,244,187],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/val01-400x3841.jpg?fit=400%2C384&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4Ye9i-funcval","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1871"}],"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=1871"}],"version-history":[{"count":7,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1871\/revisions"}],"predecessor-version":[{"id":1908,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1871\/revisions\/1908"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/1909"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=1871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=1871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=1871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}