{"id":1799,"date":"2015-05-11T14:33:40","date_gmt":"2015-05-11T05:33:40","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=1799"},"modified":"2015-05-11T14:33:40","modified_gmt":"2015-05-11T05:33:40","slug":"funcstrcomp","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/funcstrcomp\/","title":{"rendered":"\u6587\u5b57\u5217\uff1a\uff12\u3064\u306e\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\uff08StrComp \u95a2\u6570\uff09"},"content":{"rendered":"<h2>StrComp \u95a2\u6570\u306e\u4f7f\u3044\u65b9<\/h2>\n<br \/>\n<div class=\"m30-l\">\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p><em>result<\/em> = <strong>StrComp<\/strong> ( <em>string1<\/em>, <em>string2<\/em>, [ <em>compare<\/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>string1,string2&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>compare&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u30e2\u30fc\u30c9\uff08-1,0,1\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u7701\u7565\u6642\u306f\u3001\u300cOption Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u300d\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u6bd4\u8f03\u30e2\u30fc\u30c9\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002<br \/><br \/>\n<table>\n<tr>\n<td align = \"center\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td align = \"center\">-1<\/td>\n<td>vbUseCompareOption<\/td>\n<td><a href=\"https:\/\/excelwork.info\/excel\/optioncompare\/\">Option Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/a>\u306e\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">0<\/td>\n<td>vbBinaryCompare<\/td>\n<td>\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u306e\u6bd4\u8f03<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">1<\/td>\n<td>vbTextCompare<\/td>\n<td>\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u306e\u6bd4\u8f03\uff08\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u540c\u4e00\u8996\uff09<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">2<\/td>\n<td>vbDatabaseCompare<\/td>\n<td>Microsoft Access \u306e\u5834\u5408\u306e\u307f\u6709\u52b9<\/td>\n<\/tr>\n<\/table>\n<p><br \/>\n<\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3057\u7d50\u679c\u306b\u5fdc\u3058\u3066\uff08-1,0,1,Null \u5024\uff09\u306e\u3044\u305a\u308c\u304b\u3092\u8fd4\u3057\u307e\u3059\u3002\u6587\u5b57\u306e\u5927\u5c0f\u95a2\u4fc2\u306f\u57fa\u672c\u7684\u306b\u306f\u3001ASCII\u30b3\u30fc\u30c9\u30fbJIS\u30b3\u30fc\u30c9\u306e\u5927\u5c0f\u3068\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u306f\u3001\u300c\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u300d\u3001\u300c\u5168\u89d2\u30fb\u534a\u89d2\u300d\u3001\u300c\u304b\u305f\u304b\u306a\u30fb\u3072\u3089\u304c\u306a\u300d\u306f\u3044\u305a\u308c\u3082\u540c\u4e00\u3068\u307f\u306a\u3055\u308c\u307e\u3059\u3002<br \/><br \/>\n<table>\n<tr>\n<td align = \"center\"><strong>\u623b\u308a\u5024<\/strong><\/td>\n<td align = \"center\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td align = \"center\">-1<\/td>\n<td><em>string1<\/em> \u306f <em>string2<\/em> \u672a\u6e80<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">0<\/td>\n<td><em>string1<\/em> \u3068 <em>string2<\/em> \u306f\u7b49\u3057\u3044<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">1<\/td>\n<td><em>string1<\/em> \u306f <em>string2<\/em> \u3092\u8d85\u3048\u308b<\/td>\n<\/tr>\n<tr>\n<td align = \"center\">Null \u5024<\/td>\n<td><em>string1<\/em> \u307e\u305f\u306f <em>string2<\/em> \u304c Null \u5024<\/td>\n<\/tr>\n<\/table>\n<p><br \/>\n<\/li>\n<\/ul>\n<\/div>\n<br \/><br \/>\n<h2>StrComp \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=\"StrComp \u95a2\u6570\u306e\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\r\n\u3000\r\nSub Sample_StrComp()\r\n\r\n    Debug.Print StrComp(\"abc\", \"123\", 0)            '\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\uff081\uff09\r\n    Debug.Print StrComp(\"Hello!\", \"Hi!\", 1)         '\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\uff08-1\uff09\r\n    Debug.Print StrComp(\"abc\", \"ABC\", 0)            '\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\uff081\uff09\r\n    Debug.Print StrComp(\"abc\", \"ABC\", 1)            '\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\uff080\uff09\r\n    Debug.Print StrComp(\"\u3042\u3044\u3046\u3048\u304a\", \"\uff71\uff72\uff73\uff74\uff75\", 1)   '\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\uff080\uff09\r\n\r\nEnd Sub\r\n\u3000\r\n\r\n<\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp.jpg?ssl=1\" rel=\"lightbox[1799]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp.jpg?resize=400%2C307&#038;ssl=1\" alt=\"StrComp \u95a2\u6570\u3000\u4f8b\" width=\"400\" height=\"307\" class=\"alignnone size-medium wp-image-1801\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp.jpg?resize=400%2C307&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp.jpg?resize=580%2C445&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp.jpg?w=599&amp;ssl=1 599w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<br \/><\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>StrComp \u95a2\u6570\u306e\u4f7f\u3044\u65b9 \u3010\u66f8\u5f0f\u3011 result = StrComp ( s &#8230; <\/p>\n","protected":false},"author":1,"featured_media":1807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[37],"tags":[217,63,38,218],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/05\/func_strcomp-400x3071.jpg?fit=400%2C307&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-t1","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1799"}],"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=1799"}],"version-history":[{"count":7,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1799\/revisions"}],"predecessor-version":[{"id":1808,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/1799\/revisions\/1808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/1807"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=1799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=1799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=1799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}