{"id":3292,"date":"2016-06-21T19:46:48","date_gmt":"2016-06-21T17:46:48","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=3292"},"modified":"2024-02-06T16:17:46","modified_gmt":"2024-02-06T15:17:46","slug":"reverse-rows-using-power-query-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/reverse-rows-using-power-query-excel\/","title":{"rendered":"Reverse Rows Using Power Query"},"content":{"rendered":"<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/installing-power-query-excel-2010\/\" target=\"_blank\">Power Query<\/a> lets you perform a series of steps to transform your Excel data. \u00a0One of the steps it allows you to take is to\u00a0<strong>reverse the order of rows very easily<\/strong>.<br \/>\n<iframe src=\"https:\/\/www.youtube.com\/embed\/C6aOELgSLxM?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><br \/>\n<a class=\"IRPP_minimalist icon-download\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-2.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<\/span><span class=\"postTitle px-3\">Reverse-Rows-2.xlsx<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>To provide a quick comparison, it&#8217;s not straightforward to reverse rows\u00a0in Excel\u00a0<strong>without <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/50-things-you-can-do-with-excel-power-query\/\" target=\"_blank\" rel=\"noopener\" title=\"Power Query\" data-wpil-keyword-link=\"linked\">Power Query<\/a><\/strong>:<\/p>\n<p>We have our data that we want to\u00a0<strong>reverse the row order:<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-01.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3511\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-01.png\" alt=\"Reverse Rows Using Power Query\" width=\"300\" height=\"253\" \/><\/a><\/p>\n<p>Since Excel does not have a\u00a0<strong>Reverse Row\u00a0<\/strong>function, we need to add a\u00a0<strong>Helper\u00a0<\/strong>column manually that has the order listed out\u00a0<strong>(from 1 to 10).<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-02.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3512\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-02.png\" alt=\"Reverse Rows Using Power Query\" width=\"403\" height=\"256\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-02.png 403w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-02-300x191.png 300w\" sizes=\"(max-width: 403px) 100vw, 403px\" \/><\/a><\/p>\n<p>We use the\u00a0<strong>Sort\u00a0<\/strong>function and select\u00a0<strong>Sort Largest to Smallest<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-03.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3513\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-03.png\" alt=\"Reverse Rows Using Power Query\" width=\"400\" height=\"449\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-03.png 400w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-03-267x300.png 267w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>The data is now in\u00a0<strong>reverse order<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-04.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3514\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-04.png\" alt=\"Reverse Rows Using Power Query\" width=\"401\" height=\"274\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-04.png 401w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Long-Cut-04-300x205.png 300w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Let\u2019s go through the steps in detail on how to do it easily in <strong>Power Query<\/strong>:<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1<\/strong>:<\/span> Select\u00a0your data and turn it into an Excel Table by pressing the <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/333-excel-shortcuts-for-windows-and-mac\/\" target=\"_blank\" rel=\"noopener\" title=\"shortcut\" data-wpil-keyword-link=\"linked\">shortcut<\/a> <strong>Ctrl + T <\/strong>or by going to<strong> Insert &gt; Table<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-01-1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3505\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-01-1.png\" alt=\"Reverse Rows Using Power Query\" width=\"614\" height=\"288\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-01-1.png 614w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-01-1-300x141.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2<\/strong>:<\/span> Go to <strong><em>Data &gt; Get &amp; Transform &gt; From Table (Excel 2016) <\/em><\/strong><em>or<\/em><strong><em> Power Query &gt; Excel Data &gt; From Table (Excel 2013 &amp; 2010)<\/em><\/strong><\/p>\n<p><strong>Excel 2016:<\/strong><\/p>\n<p><strong><em>\u00a0<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-02.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3297\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-02.png\" alt=\"Reverse Rows Using Power Query\" width=\"618\" height=\"132\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-02.png 618w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-02-300x64.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/em><\/strong><\/p>\n<p><strong>Excel 2013 &amp; 2010:<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Replace Values Using Power Query\"  class=\"alignnone size-full wp-image-3239\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png\" alt=\"Replace Values Using Power Query\" width=\"777\" height=\"129\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png 777w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table-300x50.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table-768x128.png 768w\" sizes=\"(max-width: 777px) 100vw, 777px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #ff0000;\">STEP 3:<\/span> <\/strong>This will open up the <strong>Power Query Editor<\/strong>.<\/p>\n<p>Currently you can see the Ranks ordered from <strong>First<\/strong><strong>\u00a0to Tenth<\/strong>.\u00a0We want to reverse the ordering of the rows.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-03-1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3506\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-03-1.png\" alt=\"Reverse Rows Using Power Query\" width=\"358\" height=\"241\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-03-1.png 358w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-03-1-300x202.png 300w\" sizes=\"(max-width: 358px) 100vw, 358px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #ff0000;\">STEP 4:<\/span> <\/strong>Within here you need to select <strong><em>Transform &gt;\u00a0Reverse Rows<\/em><\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-04.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3299\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-04.png\" alt=\"Reverse Rows Using Power Query\" width=\"277\" height=\"111\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #ff0000;\">STEP 5:<\/span> <\/strong>Now you will see your changes take place. The Ranks are now ordered from <strong>Tenth<\/strong><strong>\u00a0to First<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-05-1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3507\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-05-1.png\" alt=\"Reverse Rows Using Power Query\" width=\"350\" height=\"244\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-05-1.png 350w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-05-1-300x209.png 300w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 6: <\/strong><\/span>Click <strong>Close &amp; Load<\/strong> from the <strong>Home<\/strong> tab and this will <strong>open up a brand new worksheet<\/strong> in your Excel workbook with the updated\u00a0data.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-06.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3301\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-06.png\" alt=\"Reverse Rows Using Power Query\" width=\"135\" height=\"129\" \/><\/a><\/p>\n<p>You now have your new table in reverse order.<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-07-1.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"Reverse Rows Using Power Query\"  class=\"alignnone size-full wp-image-3508\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/Reverse-Rows-07-1.png\" alt=\"Reverse Rows Using Power Query\" width=\"255\" height=\"221\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power Query lets you perform a series of steps to transform your Excel data. \u00a0One of the steps it allows you to take is to\u00a0reverse the order of rows very easily. \ufeff Download excel workbookReverse-Rows-2.xlsx &nbsp; To provide a quick comparison, it&#8217;s not straightforward to reverse rows\u00a0in Excel\u00a0without Power Query: We have our data that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17598,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[120,121],"tags":[117,131],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/3292"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=3292"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/3292\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17598"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=3292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=3292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=3292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}