{"id":4436,"date":"2023-02-22T15:06:34","date_gmt":"2023-02-22T15:06:34","guid":{"rendered":"https:\/\/www.bizinfograph.com\/resource\/?p=4436"},"modified":"2024-05-24T14:31:35","modified_gmt":"2024-05-24T14:31:35","slug":"how-to-flip-data-in-excel","status":"publish","type":"post","link":"https:\/\/www.bizinfograph.com\/resource\/how-to-flip-data-in-excel\/","title":{"rendered":"How to Flip Data in Excel &#8211; reverse the order of data in Column-row?"},"content":{"rendered":"<p>Flip Data in Excel to effortlessly reorganize your datasets and gain new insights. By flipping data, you can reverse the order of rows or columns, making it easier to analyze trends from a different perspective. Say goodbye to manual reorganization and hello to a more efficient way to manage your data. Whether you\u2019re preparing reports, analyzing historical data, or adjusting layouts for better readability, Flip Data in Excel offers a simple yet powerful solution. Embrace the flexibility and convenience of flipping data to enhance your productivity and ensure your data is always presented in the most useful format. Take advantage of this feature to streamline your workflow and make informed decisions with ease.<\/p>\n<p><strong>This Tutorial Covers:<\/strong><\/p>\n<ol>\n<li><a href=\"#flip-data-using-sort-and-helper-column\"><strong>Flip Data Using SORT and Helper Column<\/strong><\/a>\n<ul>\n<li>Vertically flip the data (Reverse Order Upside Down)<\/li>\n<li>Flip the Data Horizontally<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#flip-data-using-formulas\"><strong>Flip Data Using Formulas<\/strong><\/a>\n<ul>\n<li>Making use of the SORTBY function (available in Microsoft 365)<\/li>\n<li>Using the INDEX Function<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#flip-data-using-vba\"><strong>Flip Data Using VBA<\/strong><\/a>\n<ul>\n<li>Flip Data Vertically Using VBA<\/li>\n<li>Flip Data Horizontally Using VBA<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2><strong id=\"flip-data-using-sort-and-helper-column\">1. Flip Data Using SORT and Helper Column:<\/strong><\/h2>\n<p>Using a helper column and that helper column to sort the data is one of the simplest ways to change the order of the data in Excel.<\/p>\n<ul>\n<li>\n<h3><strong>Vertically flip the data (Reverse Order Upside Down):<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>Assume you want to reverse the names in the data set in the A column, as it is displayed below:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-4438 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-1.png\" alt=\"Flip Data in Excel\" width=\"233\" height=\"265\" \/><\/p>\n<p><strong>The steps to flip the data vertically are as follows:<\/strong><\/p>\n<p><strong>Step 1:<\/strong> Enter &#8220;Helper&#8221; as the column heading in the adjacent column.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-4439 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-2.png\" alt=\"Flip Data in Excel\" width=\"308\" height=\"263\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-2.png 308w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-2-300x256.png 300w\" sizes=\"(max-width: 308px) 100vw, 308px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Enter several numbers in the helpful column (1, 2, 3, and so on). To accomplish this, use the autofill handle option or fill series option.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-4440 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-3.png\" alt=\"Flip Data in Excel\" width=\"365\" height=\"289\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-3.png 365w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-3-300x238.png 300w\" sizes=\"(max-width: 365px) 100vw, 365px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Choose the \u201cHelper\u201d column as well as the complete collection of data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4441 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-4.png\" alt=\"Flip Data in Excel\" width=\"358\" height=\"274\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-4.png 358w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-4-300x230.png 300w\" sizes=\"(max-width: 358px) 100vw, 358px\" \/><\/p>\n<p><strong>Step 4:<\/strong> Click the &#8220;Data&#8221; tab. Click on the &#8220;Sort&#8221; icon under &#8220;Sort &amp; Filter&#8221; section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4442 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-5.png\" alt=\"Flip Data in Excel\" width=\"640\" height=\"102\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-5.png 640w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-5-300x48.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Choose &#8216;Helper&#8217; from the &#8216;Sort by&#8217; menu in the Sort dialog box. Go to the &#8220;Order&#8221;\u00a0drop-down then choose &#8220;Largest to Smallest.&#8221; After that, click \u00a0OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4443 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-6.png\" alt=\"Flip Data in Excel\" width=\"535\" height=\"248\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-6.png 535w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-6-300x139.png 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/p>\n<p>The aforementioned procedures would reverse the order of the names in the data by sorting the data based on the values of the \u201cHelper\u201d columns.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4444 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-7.png\" alt=\"Flip Data in Excel\" width=\"280\" height=\"245\" \/><\/p>\n<p>Feel free to remove the &#8220;Helper&#8221;\u00a0column once you&#8217;re finished.<\/p>\n<p>In this example, I&#8217;ve shown you how to flip the data when there is just one column, but the same method can be applied to a table as a whole. Just be careful to pick the full table before sorting the information in descending order using the helper column.<\/p>\n<ul>\n<li>\n<h3><strong>Flip the Data Horizontally:<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>A similar process may be used in Excel to flip the data horizontally.<\/p>\n<p>Using the Sort dialog box and the &#8220;Sort left to right&#8221; feature, Excel offers the ability to horizontally sort the data.<\/p>\n<p>Let&#8217;s say you wish to convert the data in the table below from vertical to horizontal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4445 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-8.png\" alt=\"Flip Data in Excel\" width=\"606\" height=\"76\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-8.png 606w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-8-300x38.png 300w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/><\/p>\n<p><strong>The procedures are as follows:<\/strong><\/p>\n<p><strong>Step 1:<\/strong> Enter &#8220;Helper&#8221; as the row heading in the row below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4446 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-9.png\" alt=\"Flip Data in Excel\" width=\"618\" height=\"104\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-9.png 618w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-9-300x50.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Please input a string of numbers in the helper row (1,2,3, and so on).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4447 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-10.png\" alt=\"Flip Data in Excel\" width=\"619\" height=\"105\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-10.png 619w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-10-300x51.png 300w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Select the \u201cHelper\u201d row as well as the complete collection of data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4448 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-11.png\" alt=\"Flip Data in Excel\" width=\"639\" height=\"131\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-11.png 639w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-11-300x62.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/p>\n<p><strong>Step 4:<\/strong> Click the &#8220;Data&#8221; tab. Click on the &#8220;Sort&#8221; icon under &#8220;Sort &amp; Filter&#8221; section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4449 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-12.png\" alt=\"Flip Data in Excel\" width=\"641\" height=\"104\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-12.png 641w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-12-300x49.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Click the \u201cOptions\u2026\u201d button in the Sort dialog box.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4450 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-13.png\" alt=\"Flip Data in Excel\" width=\"499\" height=\"236\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-13.png 499w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-13-300x142.png 300w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/p>\n<p><strong>Step 6:<\/strong> Select &#8220;Sort left to right&#8221; in the dialog box that appears and then press OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4451 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-14.png\" alt=\"Flip Data in Excel\" width=\"261\" height=\"164\" \/><\/p>\n<p><strong>Step 7:<\/strong> Choose Row 3 from the \u201cSort\u201d by drop-down menu (or whatever row has your helper column). Go to the &#8220;Order&#8221;\u00a0drop-down and then choose &#8220;Largest to Smallest.&#8221; then press OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4452 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-15.png\" alt=\"Flip Data in Excel\" width=\"519\" height=\"245\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-15.png 519w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-15-300x142.png 300w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/p>\n<p>The table would be horizontally flipped if the aforementioned actions were taken.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4453 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-16.png\" alt=\"Flip Data in Excel\" width=\"639\" height=\"112\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-16.png 639w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-16-300x53.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>When finished, you can eliminate the \u201cHelper\u201d row.<\/p>\n<h2><strong id=\"flip-data-using-formulas\">2. Flip Data Using Formulas:<\/strong><\/h2>\n<p>The new Excel formulas in Microsoft 365 make it incredibly simple to change the arrangement of a column or table.<\/p>\n<p>In this part, I&#8217;ll demonstrate how to accomplish this using either the INDEX formula (if you&#8217;re not using Microsoft 365) or the SORTBY formula (if you are).<\/p>\n<ul>\n<li>\n<h3><strong>Making use of the SORTBY function (available in Microsoft 365):<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>Let&#8217;s say you have the table below and wish to flip the information in it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4454 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-17.png\" alt=\"Flip Data in Excel\" width=\"237\" height=\"268\" \/><\/p>\n<p><strong>The steps to flip the data using SORTBY function are as follows:<\/strong><\/p>\n<p><strong>Step 1:<\/strong> To achieve this, duplicate the headers and set them where the flipped table should be.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4455 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-18.png\" alt=\"Flip Data in Excel\" width=\"346\" height=\"244\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-18.png 346w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-18-300x212.png 300w\" sizes=\"(max-width: 346px) 100vw, 346px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Apply the formula underneath the cell in the left-most header, which is as follows:<\/p>\n<p><strong>=SORTBY($A$2:$B$11,ROW(A2:A11),-1)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4456 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-19.png\" alt=\"Flip Data in Excel\" width=\"493\" height=\"290\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-19.png 493w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-19-300x176.png 300w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/p>\n<p>The ROW function result is used as the foundation for sorting the data in the calculation above.<\/p>\n<p>In this scenario, the ROW function would provide an array of numbers that represented the row numbers between the given range (which in this example would be a series of numbers such as 2, 3, 4, and so on).<\/p>\n<p>Additionally, the fact that this formula&#8217;s third parameter is a negative number forces the algorithm to sort the data in descending order.<\/p>\n<p>In essence, the order of the data would be reversed, with the record with the highest row number appearing at the top and the record with the lowest rule number appearing at the bottom.<\/p>\n<p>Once finished, you can create a static table by converting the formula to values.<\/p>\n<ul>\n<li>\n<h3><strong>Using the INDEX Function:<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>You can use the incredible INDEX function if you don&#8217;t have access to the SORTBY function.<\/p>\n<p>Imagine you wish to flip a dataset of names that looks like the one below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4457 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-20.png\" alt=\"Flip Data in Excel\" width=\"150\" height=\"265\" \/><\/p>\n<p><strong>The steps to flip the data using INDEX function are as follows:<\/strong><\/p>\n<p><strong>Step 1:<\/strong> To achieve this, duplicate the header and set the header where the flipped table should be.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4458 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-21.png\" alt=\"Flip Data in Excel\" width=\"254\" height=\"270\" \/><\/p>\n<p><strong>Step 2:<\/strong> Apply the formula underneath the cell in the left-most header, which is as follows:<\/p>\n<p><strong>=INDEX($A$2:$A$11,ROWS(A2:$A$11))<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4459 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-22.png\" alt=\"Flip Data in Excel\" width=\"513\" height=\"293\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-22.png 513w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-22-300x171.png 300w\" sizes=\"(max-width: 513px) 100vw, 513px\" \/><\/p>\n<p><strong>How does this equation function?<\/strong><\/p>\n<p>The INDEX function is used in the formula above to retrieve the value from the cell based on the second argument&#8217;s value.<\/p>\n<p>The second argument, where I utilized the ROWS function, is where the actual magic happens.<\/p>\n<p>The first cell would return the number of rows between A2 and A11, which would be 10, because I had locked the second portion of the reference in the ROWS method.<\/p>\n<p>However, because I have locked it and made it absolute, the initial reference would stay the same as is as it moves along the rows while switching to A3, A4, and so on.<\/p>\n<p>The output of the ROWS function would reduce by 1 as we moved down the rows, from 10 to 9 to 8, and so on.<\/p>\n<p>This would ultimately give us the data in reverse order because the INDEX function returns the result based on the number in the second argument.<\/p>\n<p>Even if the data collection contains numerous columns, you can still use the same formula. However, a second parameter that specifies the column number from which the data must be collected must be provided.<\/p>\n<p>Suppose you wish to flip the order of the complete table and you have the data set as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4460 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-23.png\" alt=\"Flip Data in Excel\" width=\"234\" height=\"265\" \/><\/p>\n<p>The equation that does that is listed below:<\/p>\n<p><strong>=INDEX($A$2:$B$11,ROWS(A2:$A$11),COLUMNS($A$2:A2))<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4461 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-24.png\" alt=\"Flip Data in Excel\" width=\"572\" height=\"274\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-24.png 572w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-24-300x144.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/p>\n<p>This formula is similar to the previous one, with the addition of a third argument that designates the column number where the value should be fetched.<\/p>\n<p>I&#8217;ve used the COLUMNS function to make this formula dynamic, which will continuously change the column value when you copy it to the right from 1 to 2 to 3.<\/p>\n<p>Once finished, you can translate the formulas into values to ensure a static outcome.<\/p>\n<p><strong>Note:<\/strong> Reversing the order of a data set using a formula in Excel will result in the loss of the original formatting. If the sorted data also requires the original formatting, you may either manually apply it or copy and paste the formatting from the original data set.<\/p>\n<h2><strong id=\"flip-data-using-vba\">3. Flip Data Using VBA:<\/strong><\/h2>\n<p>You can also attempt the VBA method if you flip column and row in excel is something you need to do frequently.<\/p>\n<p>A VBA macro code can be copied and pasted once inside the worksheet in the VBA editor before being reused repeatedly inside the same workbook.<\/p>\n<p>To utilize the code in any workbook on your machine, you can alternatively store it as an Excel add-in or in the Personal Macro Workbook.<\/p>\n<p>In the next section, VBA code is provided to flip Excel columns and rows.<\/p>\n<ul>\n<li>\n<h3><strong>Flip Data Vertically Using VBA:<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>The VBA code that would flip the worksheet&#8217;s selected data vertically is provided below.<\/p>\n<p>Sub FlipVerically()<\/p>\n<p>Dim Rng As Range<\/p>\n<p>Dim WorkRng As Range<\/p>\n<p>Dim Arr As Variant<\/p>\n<p>Dim i As Integer, j As Integer, k As Integer<\/p>\n<p>On Error Resume Next<\/p>\n<p>xTitleId = &#8220;Flip columns vertically&#8221;<\/p>\n<p>Set WorkRng = Application.Selection<\/p>\n<p>Set WorkRng = Application.InputBox(&#8220;Range&#8221;, xTitleId, WorkRng.Address, Type:=8)<\/p>\n<p>Arr = WorkRng.Formula<\/p>\n<p>Application.ScreenUpdating = False<\/p>\n<p>Application.Calculation = xlCalculationManual<\/p>\n<p>For j = 1 To UBound(Arr, 2)<\/p>\n<p>k = UBound(Arr, 1)<\/p>\n<p>For i = 1 To UBound(Arr, 1) \/ 2<\/p>\n<p>xTemp = Arr(i, j)<\/p>\n<p>Arr(i, j) = Arr(k, j)<\/p>\n<p>Arr(k, j) = xTemp<\/p>\n<p>k = k &#8211; 1<\/p>\n<p>Next<\/p>\n<p>Next<\/p>\n<p>WorkRng.Formula = Arr<\/p>\n<p>Application.ScreenUpdating = True<\/p>\n<p>Application.Calculation = xlCalculationAutomatic<\/p>\n<p>End Sub<\/p>\n<p><strong>How to use the Flip Columns macro?<\/strong><\/p>\n<p><strong>Step 1:<\/strong> Press (Alt + F11) on your keyboard to open the \u201cMicrosoft Visual Basic for Applications\u201d window. Paste the aforementioned code into the Code window by selecting Insert &gt; Module.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4462 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-25.png\" alt=\"Flip Data in Excel\" width=\"543\" height=\"358\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-25.png 543w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-25-300x198.png 300w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Start the macro by pressing F5 on your keyboard. When the Flip Columns dialog appears, choose a range to flip using the prompt. Using the mouse, choose one or more columns (except the column headers), click OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4463 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-26.png\" alt=\"Flip Data in Excel\" width=\"413\" height=\"233\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-26.png 413w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-26-300x169.png 300w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><\/p>\n<p>After clicking OK, the outcome will appear shortly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4464 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-27.png\" alt=\"Flip Data in Excel\" width=\"214\" height=\"279\" \/><\/p>\n<p>Make sure to save your file as an Excel worksheet that supports macros in order to save the macro.<\/p>\n<ul>\n<li>\n<h3><strong>Flip Data Horizontally Using VBA:<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>The VBA code that would flip the worksheet&#8217;s selected data horizontally is provided below.<\/p>\n<p>Sub FlipDataHorizontally()<\/p>\n<p>Dim Rng As Range<\/p>\n<p>Dim WorkRng As Range<\/p>\n<p>Dim Arr As Variant<\/p>\n<p>Dim i As Integer, j As Integer, k As Integer<\/p>\n<p>On Error Resume Next<\/p>\n<p>xTitleId = &#8220;Flip Data Horizontally&#8221;<\/p>\n<p>Set WorkRng = Application.Selection<\/p>\n<p>Set WorkRng = Application.InputBox(&#8220;Range&#8221;, xTitleId, WorkRng.Address, Type:=8)<\/p>\n<p>Arr = WorkRng.Formula<\/p>\n<p>Application.ScreenUpdating = False<\/p>\n<p>Application.Calculation = xlCalculationManual<\/p>\n<p>For i = 1 To UBound(Arr, 1)<\/p>\n<p>k = UBound(Arr, 2)<\/p>\n<p>For j = 1 To UBound(Arr, 2) \/ 2<\/p>\n<p>xTemp = Arr(i, j)<\/p>\n<p>Arr(i, j) = Arr(i, k)<\/p>\n<p>Arr(i, k) = xTemp<\/p>\n<p>k = k \u2013 1<\/p>\n<p>Next<\/p>\n<p>Next<\/p>\n<p>WorkRng.Formula = Arr<\/p>\n<p>Application.ScreenUpdating = True<\/p>\n<p>Application.Calculation = xlCalculationAutomatic<\/p>\n<p>End Sub<\/p>\n<p>Follow the instructions above to use\u00a0the macro to your Excel workbook. The next dialog window will appear when you execute the macro and ask you to choose a range. Click OK after selecting the full table, excluding the header row.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4465 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-28.png\" alt=\"Flip Data in Excel\" width=\"637\" height=\"189\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-28.png 637w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-28-300x89.png 300w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/p>\n<p>In a split second, the rows&#8217; data order was reversed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4466 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-29.png\" alt=\"Flip Data in Excel\" width=\"639\" height=\"84\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-29.png 639w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/02\/Flip-data-29-300x39.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>These are some techniques you can employ in Excel to flip the data (i.e., reverse the order of the data set).<\/p>\n<p>Both column row excel data flipping may be accomplished using the techniques I&#8217;ve discussed in this lesson (formulas, the SORT feature, and VBA).<\/p>\n<p>I sincerely hope this tutorial was helpful.<\/p>\n<h2>Application of Flip Data in Excel<\/h2>\n<ul>\n<li><strong>Transpose Tables<\/strong>: Flip Data in Excel to transpose tables, converting rows into columns and vice versa, facilitating data analysis and presentation.<\/li>\n<li><strong>Change Data Orientation<\/strong>: Reverse the order of rows or columns to change the orientation of data, providing a different perspective for analysis or visualization.<\/li>\n<li><strong>Adjust Layouts<\/strong>: Rearrange data layouts by flipping rows or columns to reorganize information and improve the clarity and readability of spreadsheets.<\/li>\n<li><strong>Pivot Data<\/strong>: Pivot data by flipping rows and columns to transform datasets into pivot tables, allowing for dynamic analysis and exploration of data relationships.<\/li>\n<li><strong>Combine Data<\/strong>: Merge multiple datasets by flipping and aligning rows or columns, enabling comprehensive analysis and comparison of related information.<\/li>\n<li><strong>Data Cleaning<\/strong>: Use Flip Data in Excel to clean and standardize datasets by rearranging information into a consistent format, enhancing data quality and usability.<\/li>\n<\/ul>\n<p>For ready-to-use Dashboard Templates:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Finance\" target=\"_blank\" rel=\"noopener\">Financial Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Sales\" target=\"_blank\" rel=\"noopener\">Sales Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Human-Resource\" target=\"_blank\" rel=\"noopener\">HR Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.executiveknowledge.org\/dashboard-templates\/35\" target=\"_blank\" rel=\"noopener\">Data Visualization Charts<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Flip Data in Excel to effortlessly reorganize your datasets and gain new insights. By flipping data, you can reverse the order of rows or columns, making it easier to analyze trends from a different perspective. Say goodbye to manual reorganization and hello to a more efficient way to manage your data. Whether you\u2019re preparing reports, &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.bizinfograph.com\/resource\/how-to-flip-data-in-excel\/\"> <span class=\"screen-reader-text\">How to Flip Data in Excel &#8211; reverse the order of data in Column-row?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[566],"tags":[567,568],"class_list":["post-4436","post","type-post","status-publish","format-standard","hentry","category-flip-data-in-excel","tag-flip-data-in-excel","tag-reverse-the-order-of-data-in-column-row"],"_links":{"self":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/comments?post=4436"}],"version-history":[{"count":5,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4436\/revisions"}],"predecessor-version":[{"id":9248,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/4436\/revisions\/9248"}],"wp:attachment":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/media?parent=4436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/categories?post=4436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/tags?post=4436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}