How to flip / reverse a row of data order in Excel quickly?
When you need to reverse or flip the data order of a row, how can you quickly get it done? Normally you may have to use a VBA code or other Excel add-ins for doing so, because Excel doesn’t support such operation. And here comes the following tricky things will help you quickly flip or reverse a row of data order in Excel.
Here is a neat VBA macro can help you quickly flip / reverse the data order in rows horizontally.
Step 1: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert > Module, and paste the following macro in the Modulewindow.
Sub FlipRows() 'Updateby20131126 Dim Rng As Range Dim WorkRng As Range Dim Arr As Variant Dim i As Integer, j As Integer, k As Integer On Error Resume Next xTitleId = "KutoolsforExcel" Set WorkRng = Application.Selection Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) Arr = WorkRng.Formula For i = 1 To UBound(Arr, 1) k = UBound(Arr, 2) For j = 1 To UBound(Arr, 2) / 2 xTemp = Arr(i, j) Arr(i, j) = Arr(i, k) Arr(i, k) = xTemp k = k - 1 Next Next WorkRng.Formula = Arr End Sub
Step 3: Press the F5 key to run this macro, and a dialog is displayed for you to select a range to work with, see screenshot:
Step 4: Press OK, you can see the result as shown below:
With Kutools for Excel’s Flip Horizontal Range tool, you can flip / reverse data order horizontally in selected rows quickly.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.
Step 1: Select the row in which you will flip the data.
Step 2: Click the Kutools > Range Converter > Flip Horizontal Range, see screenshot:
Then you will see all the data order is reversed in the selected rows.
Click Flip Horizontal Range to know more about this feature.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!