{"id":3242,"date":"2015-08-25T15:23:50","date_gmt":"2015-08-25T06:23:50","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3242"},"modified":"2015-08-26T00:06:59","modified_gmt":"2015-08-25T15:06:59","slug":"cellsortmethod","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/cellsortmethod\/","title":{"rendered":"\u4e26\u3079\u66ff\u3048\uff08Sort \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>Sort \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p>\u4efb\u610f\u306e\u30bb\u30eb\u7bc4\u56f2\u5185\u3067\u3001\u4e26\u3079\u66ff\u3048\u3092\u884c\u3044\u307e\u3059\u3002\u5f15\u6570\u3067\u3001\u4e26\u3079\u66ff\u3048\u306e\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u4e26\u3079\u66ff\u3048\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u6700\u5927\uff13\u3064\u307e\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n    Excel 2007 \u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001<strong>Sort \u30e1\u30bd\u30c3\u30c9<\/strong>  \u306b\u52a0\u3048\u3066\u3001 \u65b0\u3057\u304f <strong>Sort \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u304c\u3001\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30bb\u30eb\u306e\u8272\u3084\u30d5\u30a9\u30f3\u30c8\u306e\u8272\u3067\u3001\u4e26\u3079\u66ff\u3048\u304c\u3067\u304d\u308b\u306a\u3069\u3001\u6a5f\u80fd\u304c\u62e1\u5f35\u3055\u308c\u3066\u3044\u307e\u3059\u3002<a href=\"https:\/\/excelwork.info\/excel\/cellsortcollection\/\"> \u21d2 \u4e26\u3079\u66ff\u3048\uff08Sort \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09<\/a> \u3092\u53c2\u7167<\/p>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Sort<\/strong> ( [ <em>key1<\/em>, <em>order1<\/em>, <em>key2<\/em>, <em>type<\/em>, <em>order2<\/em>, <em>key3<\/em>, <em>order3<\/em>, <em>header<\/em>, <em>ordercustom<\/em>, <em>matchcase<\/em>, <em>orientation<\/em>, <em>sortmethod<\/em>, <em>dataoption1<\/em>, <em>dataoption2<\/em>, <em>dataoption3<\/em> ] )<\/p><\/div>\n<br \/>\n<h3>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\n<div class=\"m30-l\">\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>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>key1,key2,key3&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4e26\u3079\u66ff\u3048\u30ad\u30fc\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092 <strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u30bb\u30eb\uff09<\/strong>\u3001\u307e\u305f\u306f\u6587\u5b57\u5217\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>order1,order2,order3&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<em>key1\uff5e3<\/em> \u3067\u6307\u5b9a\u3057\u305f\u5024\u306e\u4e26\u3073\u66ff\u3048\u9806\u5e8f\u3092 <strong>XlSortOrder \u5217\u6319\u578b<\/strong> \u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlAscending<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u6607\u9806\u3067\u4e26\u3079\u66ff\u3048\uff08\u65e2\u5b9a\u5024\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlDescending<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u964d\u9806\u3067\u4e26\u3079\u66ff\u3048<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4e26\u3079\u66ff\u3048\u308b\u8981\u7d20\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u3079\u66ff\u3048\u306e\u6642\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<li>header&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5148\u982d\u884c\u3092\u898b\u51fa\u3057\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<strong>XlYesNoGuess \u5217\u6319\u578b<\/strong><br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlGuess<\/td>\n<td width=\"80\" align = \"center\">0<\/td>\n<td width=\"320\" >Excel \u304c\u81ea\u52d5\u7684\u306b\u8a2d\u5b9a<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlYes<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u898b\u51fa\u3057\u3068\u3057\u3066\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlNo<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u898b\u51fa\u3057\u3068\u3057\u3066\u4f7f\u7528\u3057\u306a\u3044\uff08\u7bc4\u56f2\u5168\u4f53\u304c\u4e26\u3079\u66ff\u3048\u306e\u5bfe\u8c61\uff09\u65e2\u5b9a\u5024<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>ordercustom&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u306e\u4e26\u3079\u66ff\u3048\u9806\u306e\u30ea\u30b9\u30c8\u5185\u306e\u756a\u53f7\u3092\u793a\u3059\u30011 \u304b\u3089\u59cb\u307e\u308b\u6574\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>matchcase&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3059\u308b\u5834\u5408\u306f\u3001<strong>True<\/strong>\u3001\u3057\u306a\u3044\u5834\u5408\u306f <strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u3079\u66ff\u3048\u306b\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/li>\n<li>orientation&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4e26\u3079\u66ff\u3048\u306e\u65b9\u5411\u3092  <strong>XlSortOrientation \u5217\u6319\u578b<\/strong> \u3067\u6307\u5b9a\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlSortColumns<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u884c\u5358\u4f4d\u3067\u4e26\u3079\u66ff\u3048\uff08\u4e0a\u304b\u3089\u4e0b\uff09\u65e2\u5b9a\u5024<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlSortRows<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u5217\u5358\u4f4d\u3067\u4e26\u3079\u66ff\u3048\uff08\u5de6\u304b\u3089\u53f3\uff09<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>sortmethod&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4e26\u3079\u66ff\u3048\u306e\u65b9\u6cd5\u3092 <strong>XlSortMethod \u5217\u6319\u578b<\/strong> \u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlPinYin<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u3075\u308a\u304c\u306a\u3092\u4f7f\u3063\u3066\u4e26\u3079\u66ff\u3048\uff08\u65e2\u5b9a\u5024\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlStroke<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u3075\u308a\u304c\u306a\u3092\u4f7f\u308f\u305a\u306b\u4e26\u3079\u66ff\u3048<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>DataOption1,DataOption2,DataOption3&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<em>Key1\uff5e3<\/em> \u3067\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u3067\u30c6\u30ad\u30b9\u30c8\u3092\u4e26\u3079\u66ff\u3048\u308b\u65b9\u6cd5\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u3079\u66ff\u3048\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<strong>XlSortDataOption \u5217\u6319\u578b<\/strong><br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffcc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffcc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffcc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlSortNormal<\/td>\n<td width=\"80\" align = \"center\">0<\/td>\n<td width=\"320\" >\u6570\u5024\u3068\u30c6\u30ad\u30b9\u30c8\u3092\u5225\u3005\u306b\u4e26\u3079\u66ff\u3048\uff08\u65e2\u5b9a\u5024\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlSortTextAsNumbers<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u30c6\u30ad\u30b9\u30c8\u3092\u6570\u5024\u30c7\u30fc\u30bf\u3068\u3057\u3066\u4e26\u3079\u66ff\u3048<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Sort \u30e1\u30bd\u30c3\u30c9 \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=\"Sort \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample01_Sort()\r\n\r\n    Dim SortRng As Range\r\n    \r\n    Set SortRng = Range(\"B3\").CurrentRegion\r\n    \r\n    '\u30bd\u30fc\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u5b9f\u884c\r\n    SortRng.Sort key1:=\"\u5408\u8a08\", _\r\n                 order1:=xlDescending, _\r\n                 key2:=\"\u767b\u9332\u756a\u53f7\", _\r\n                 order2:=xlAscending, _\r\n                 Header:=xlYes, _\r\n                 MatchCase:=False, _\r\n                 Orientation:=xlSortColumns, _\r\n                 SortMethod:=xlStroke\r\n\r\n    \r\n    '\u30bb\u30eb\u306e\u80cc\u666f\u8272\r\n    Dim i As Long\r\n    With SortRng\r\n        For i = 2 To .Rows.Count\r\n            If i Mod 2 = 0 Then\r\n                .Rows(i).Interior.ColorIndex = 19\r\n            Else\r\n                .Rows(i).Interior.ColorIndex = 2\r\n            End If\r\n        Next i\r\n    End With\r\n        \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>Sort \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b \u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9\u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=400%2C214&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\u3000\u5b9f\u884c\u524d\" width=\"400\" height=\"214\" class=\"alignnone size-medium wp-image-3258\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=400%2C214&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=580%2C311&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?w=984&amp;ssl=1 984w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_02.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_02.jpg?resize=400%2C214&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\u3000\u4f8b01b\" width=\"400\" height=\"214\" class=\"alignnone size-medium wp-image-3250\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_02.jpg?resize=400%2C214&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_02.jpg?resize=580%2C311&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_02.jpg?w=986&amp;ssl=1 986w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n<h2>Sort \u30e1\u30bd\u30c3\u30c9\uff08\u5217\u5358\u4f4d\u306e\u4e26\u3079\u66ff\u3048\uff09 \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=\"Sort \u30e1\u30bd\u30c3\u30c9\uff08\u5217\u5358\u4f4d\u306e\u4e26\u3079\u66ff\u3048\uff09 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample02_Sort()\r\n\r\n    Dim SortRng As Range\r\n    \r\n    Set SortRng = Range(\"B3\").CurrentRegion\r\n    \r\n    '\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u306e\u4e26\u3079\u66ff\u3048\u30ea\u30b9\u30c8\u3092\u8ffd\u52a0\r\n    Application.AddCustomList _\r\n        ListArray:=Array(\"\u767b\u9332\u756a\u53f7\", \"\u6c0f\u540d\", \"\u793e\u4f1a\", \"\u7406\u79d1\", \"\u56fd\u8a9e\", \"\u6570\u5b66\", \"\u82f1\u8a9e\", \"\u5408\u8a08\", \"\u5e73\u5747\")\r\n    \r\n    \r\n    '\u30bd\u30fc\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u5b9f\u884c\uff08\u5217\u5358\u4f4d\u306e\u4e26\u3079\u66ff\u3048\uff09\r\n    SortRng.Sort key1:=Range(\"B3\"), _\r\n                 order1:=xlAscending, _\r\n                 Header:=xlNo, _\r\n                 ordercustom:=Application.CustomListCount + 1, _\r\n                 MatchCase:=False, _\r\n                 Orientation:=xlSortRows, _\r\n                 SortMethod:=xlStroke\r\n    \r\n    \r\n    '\u30bb\u30eb\u306e\u80cc\u666f\u8272\r\n    Dim i As Long\r\n    With SortRng\r\n        For i = 2 To .Rows.Count\r\n            If i Mod 2 = 0 Then\r\n                .Rows(i).Interior.ColorIndex = 19\r\n            Else\r\n                .Rows(i).Interior.ColorIndex = 2\r\n            End If\r\n        Next i\r\n    End With\r\n        \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>Sort \u30e1\u30bd\u30c3\u30c9\uff08\u5217\u5358\u4f4d\u306e\u4e26\u3079\u66ff\u3048\uff09\u4f7f\u7528\u4f8b \u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9\u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=400%2C214&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\u3000\u5b9f\u884c\u524d\" width=\"400\" height=\"214\" class=\"alignnone size-medium wp-image-3258\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=400%2C214&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?resize=580%2C311&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011.jpg?w=984&amp;ssl=1 984w\" 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\/08\/sortmethod_03.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_03.jpg?resize=400%2C214&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\u3000\u4f8b02\" width=\"400\" height=\"214\" class=\"alignnone size-medium wp-image-3251\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_03.jpg?resize=400%2C214&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_03.jpg?resize=580%2C311&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_03.jpg?w=984&amp;ssl=1 984w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n<h2>Sort \u30e1\u30bd\u30c3\u30c9\uff08\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\uff09 \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=\"Sort \u30e1\u30bd\u30c3\u30c9\uff08\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\uff09 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample03_Sort()\r\n\r\n    Dim myRng As Range\r\n    \r\n    Set myRng = ActiveSheet.PivotTables.Item(1).PivotFields(\"\u767b\u9332\u756a\u53f7\").DataRange\r\n    \r\n    myRng.Sort order1:=xlDescending, Type:=xlSortLabels\r\n        \r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>Sort \u30e1\u30bd\u30c3\u30c9\uff08\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\uff09\u4f7f\u7528\u4f8b \u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9\u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_01.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_01.jpg?resize=400%2C239&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\uff08\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\uff09\u4f8b01a\" width=\"400\" height=\"239\" class=\"alignnone size-medium wp-image-3252\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_01.jpg?resize=400%2C239&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_01.jpg?resize=580%2C347&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_01.jpg?w=955&amp;ssl=1 955w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_02.jpg?ssl=1\" rel=\"lightbox[3242]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_02.jpg?resize=400%2C237&#038;ssl=1\" alt=\"Sort \u30e1\u30bd\u30c3\u30c9\uff08\u30d4\u30dc\u30c3\u30c8\u30c6\u30fc\u30d6\u30eb\uff09\u4f8b01b\" width=\"400\" height=\"237\" class=\"alignnone size-medium wp-image-3253\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_02.jpg?resize=400%2C237&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_02.jpg?resize=580%2C344&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_pivot_02.jpg?w=956&amp;ssl=1 956w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>Sort \u30e1\u30bd\u30c3\u30c9 \u4efb\u610f\u306e\u30bb\u30eb\u7bc4\u56f2\u5185\u3067\u3001\u4e26\u3079\u66ff\u3048\u3092\u884c\u3044\u307e\u3059\u3002\u5f15\u6570\u3067\u3001\u4e26\u3079\u66ff\u3048\u306e\u6761 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[270,525,63,38,269,524],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/sortmethod_011-400x2141.jpg?fit=400%2C214&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Qi","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3242"}],"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=3242"}],"version-history":[{"count":15,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3242\/revisions"}],"predecessor-version":[{"id":3331,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3242\/revisions\/3331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3317"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}