Close Menu
Computing.net
    Facebook X (Twitter) Instagram
    Computing.netComputing.net
    • News
      1. AI
      2. Crypto
      3. Gaming
      4. Hardware
      5. Security
      6. Software
      7. View All

      Anthropic’s COBOL Automation Tool Triggers IBM Stock Plunge and Crypto Market Decline

      February 24, 2026

      AI Trading Bot Loses $441K in Crypto After Decimal Point Mistake

      February 23, 2026

      Tesla (TSLA) Stock: Goodbye Sedans, Hello Robots in Dramatic Production Shift

      January 29, 2026

      Palantir Technologies (PLTR) Stock: Why Bears May Be Wrong About Valuation Concerns

      January 29, 2026

      SUI Token Rallies 40% Following Major Staking Event and CME Futures Announcement

      May 12, 2026

      Chainlink (LINK) Surges to $10.40 as Network Activity Hits Eight-Month Peak

      May 12, 2026

      Dogecoin Whales Ramp Up Accumulation as DOGE Eyes Critical Breakout Levels

      May 12, 2026

      Bitcoin Holds $81K While Burry Flags Nasdaq Bubble and Oil Surges Past $105

      May 12, 2026

      Hamster Kombat: Unraveling TON’s Gaming Phenomenon

      August 7, 2024

      W-Coin: Exploring the Latest Telegram Tap-to-Earn Phenomenon

      August 7, 2024

      Hamster Kombat: 300 Million Players & Counting, HMSTR Token Airdrop Soon!

      July 31, 2024

      Hamster Kombat Developers Work with TON Team on Airdrop Solution

      July 30, 2024

      Nothing Expands Product Line with New AI Feature & Phone Update

      July 31, 2024

      Security Audit Reveals Concerns in Atari’s Blockchain Game on Base

      August 6, 2024

      SideWinder Group Targets Maritime Facilities in New Cyber Espionage Campaign

      July 30, 2024

      OAuth Implementation Flaw Exposes Millions of Websites to XSS Attacks

      July 30, 2024

      Hamster Kombat Players Face Growing Cybersecurity Threats

      July 25, 2024

      Anthropic’s COBOL Automation Tool Triggers IBM Stock Plunge and Crypto Market Decline

      February 24, 2026

      Cookie Crumble: Google Halts Plans to Eliminate Third-Party Cookies in Chrome

      July 23, 2024

      Big Brother is Watching: Apple’s Creepy New Ad Urges iPhone Users to Ditch Chrome

      July 23, 2024

      Nvidia Stock Soars to New Record at $219.44 Ahead of May 20 Earnings

      May 12, 2026

      Rocket Lab Shares Surge Past $120 Following Wave of Analyst Upgrades

      May 12, 2026

      GM Shares Decline Following 600 IT Layoffs Amid Strategic AI Workforce Transformation

      May 12, 2026

      SES Delivers €847M Q1 Performance as Intelsat Integration and Aviation Deals Fuel Expansion

      May 12, 2026
    • How To

      Batch Files: Tokens and Delimiters (FOR Loops)

      July 31, 2024

      Types of Ethernet Cabling & Electrical Low Voltage Wiring

      July 9, 2024

      What You Should Know About .JSON File Extension

      January 10, 2023

      Bkup File Extension

      November 19, 2022

      HEIC File Extension

      November 19, 2022
    • Office
      1. Excel
      2. Google Sheets
      3. View All

      How to Convert Column List to Comma Separated List in Excel

      July 24, 2024

      How to Find the Last Monday of the Month in Excel

      July 24, 2024

      Convert Bytes to MB or GB in Excel: 3 Methods!

      July 24, 2024

      How to Remove Characters from Right in Excel

      July 30, 2023

      How to Subtract in Google Sheets: Complete Guide

      July 31, 2024

      Bullet Points in Google Sheets

      January 20, 2022

      Sort by Date in Google Sheets

      January 18, 2022

      Google Sheets Timestamp

      January 17, 2022

      How to Subtract in Google Sheets: Complete Guide

      July 31, 2024

      How to Convert Column List to Comma Separated List in Excel

      July 24, 2024

      How to Find the Last Monday of the Month in Excel

      July 24, 2024

      Convert Bytes to MB or GB in Excel: 3 Methods!

      July 24, 2024
    • Answers
    • About
    • Contact
    Facebook X (Twitter)
    Computing.net
    Excel

    How to Flip or Reverse Data in Excel

    Constantin KioulafasBy Constantin KioulafasFebruary 2, 2022
    Twitter LinkedIn Email Telegram
    Flip or Reverse Data in Excel
    Twitter LinkedIn Email Telegram

    Today we’ll be learning How to Flip or Reverse Data in Excel, which refers to the process of reversing the current order of a list or an array of data.

    This would be a piece of cake in Excel if the data is ordered, but what if it isn’t?

    While Excel is excellent at reverse sorting, if the data is not already sorted, there is no menu option or function to flip the data.

    Along the path to solving this problem, we will also take a look at how to flip data in a row.

    Contents:

    Toggle
    • Flip (or Reverse) Data in Excel
    • INDEX
    • Syntax
    • Sample Usage
    • ROWS
    • Syntax
    • Remarks
    • Sample Usage
    • Flip Row Data in Excel
    • COLUMNS
    • Sample Usage
    • Syntax
    • Conclusion

    Flip (or Reverse) Data in Excel

    But first, let’s take a look at how to flip data in a column or columns.

    We will be using the following simple list of names.

    Our aim is to flip on the Lastname column.

    As we can see, the names are not sorted, but the first method we will employ will rely on sorting, just not on the Lastname column.

    Instead, we are going to turn column C into an auto-incrementing counter.

    In this case, column C is referred to as a helper column.

    It serves no purpose other than to take on the role of a sorted column, and in fact, once we’ve achieved our goal, we can delete it.

    We start by entering the number 1 into row 2 of column C, and the number 2 into row 3 of the same column.

    This sets the pattern, and since Excel is smart enough to know what we want, we can then use the fill handle at the bottom right hand corner of the bounding box around cells C2 and C3, to drag it down to cell C9, thus populating the remaining rows in column C.

    The result is that we have now filled column C with auto-incrementing numbers.

    Dragging the fill handle may not seem much of a time saver with so few entries, but imagine having to enter the numbers manually in a sheet comprising hundreds of rows.

    Column C is now a sorted column, which means we can easily reverse the order of our sheet based on this column, using the built-in sort functionality.

    We start by selecting all the cells that will be included in the sort, which in our case is the range of cells A2 to C9.

    Next, we right mouse click inside the selected cell range to bring up the context menu, and select Sort > Custom Sort…

    This will open the Sort dialog box. We now need to specify the criteria by which to sort.

    First, we specify on which column we will sort, in our case Column C.

    We can leave the Sort On field as is, Cell Values.

    Since we want to flip the order of our data, we also need to change the Order field from Smallest to Largest to Largest to Smallest so that the order in column C results in 8 at the top, down to 1 at the bottom.

    Once these are set, click on the OK button to apply the sort.

    The result, as can be seen in the screenshot above, is that the order of the names is now in reverse order to that originally.

    The next method of reversing the order, involves the use of a couple of Excel functions.

    There is however, one consideration to take note of.

    Whereas the previous method flipped the original columns directly, this method creates a new column or columns (depending on the number of columns included in our sort), that contain the flipped data, leaving the original columns intact.

    The functions that we are going to be using are INDEX and ROWS. Their definitions are given below.

    INDEX

    The INDEX function returns a value or the reference to a value from within a table or range.

    Syntax

    INDEX(array, row_num, [column_num])

    The array form of the INDEX function has the following arguments:

    • array    Required. A range of cells or an array constant.
      • If array contains only one row or column, the corresponding row_num or column_num argument is optional.
      • If array has more than one row and more than one column, and only row_num or column_num is used, INDEX returns an array of the entire row or column in array.
    • row_num    Required, unless column_num is present. Selects the row in array from which to return a value. If row_num is omitted, column_num is required.
    • column_num    Optional. Selects the column in array from which to return a value. If column_num is omitted, row_num is required.

     

    Sample Usage

    INDEX(A1:C20, 5, 1)

    ROWS

    Returns the number of rows in a specified array or range.

    Syntax

    ROWS(range)

    • range – The range whose row count will be returned

    Remarks

    • If both the row_num and column_num arguments are used, INDEX returns the value in the cell at the intersection of row_num and column_num.
    • row_num and column_num must point to a cell within array; otherwise, INDEX returns a #REF! error.
    • If you set row_num or column_num to 0 (zero), INDEX returns the array of values for the entire column or row, respectively. To use values returned as an array, enter the INDEX function as an array formula.

    Sample Usage

    ROWS(A9:A62)

    ROWS({1;2;3;4;5})

    Our formula is =INDEX($A$2:$B$9, ROWS(A2:$A$9), 0) which we enter into the empty cell C2, as shown in the snapshot above.

    The ROWS function call returns the number of rows in the range passed, which is initially set to A2:$A$9.

    The first part of the range, A2, is a relative cell reference, while the second part, $A$9, is an absolute cell reference.

    The reason for this is that we will use the fill handle to propagate our formula into all the cells from C2 to C9 in our sheet, and we want the first part of the range to be automatically adjusted to match the row number.

    For cell C2, ROWS will return the number of cells from A2 to A9, which is 7.

    For cell C3, Excel will have adjusted the formula so that the cell reference will now be A3:$A$9.

    Notice that the relative reference has been updated to A3, while the absolute reference has remained fixed at A9.

    So, for cell C3, the ROWS function will return the number of rows from A3 to A9, which is 6.

    For cell C4, ROWS will return the number of rows for the range A4:$A$9, which is 5, and so on down the column.

    Hence, the ROWS function is returning a decreasing count, starting with 7 for cell C2, and going down to 1 for cell C9.

    The INDEX function accepts a range as its first parameter, and returns the cell in the range referenced by the row and column indexes supplied as the second and third parameters respectively.

    Our range is fixed at $A$2:$B$9.

    The row index is supplied by the ROWS function call, which for cell C2 will be 7, while we have hard set the column index to 0 and this deserves a short explanation.

    Normally, the index parameter has a value of 1 or greater, and references which column in a range is to be referenced, the first column being 1.

    Specifying a column index of 0 causes the INDEX function to return what Excel calls the results of a spilled formula, which returns the entire row in the range.

    If we change the column index parameter to 1 in the formula, we would only get the Lastname column’s cell being returned, or 2 for only the Firstname.

    As we have it, we get the entire row in the range.

    You can read more on spilled array behavior in the Microsoft support article Dynamic array formulas and spilled array behavior.

    Having entered the formula, we can now apply it to the remaining cells in column C by dragging the fill handle down to cell C9.

    The result is as shown above, where columns C and D are the flip of the original columns A and B.

    Flip Row Data in Excel

    Unfortunately, Excel sorts data only by columns, not by rows, so we can’t call upon the Sort > Custom Sort… menu option.

    We can however, use our INDEX formula with one minor change.

    Instead of using the ROWS function, we use the equivalent, COLUMNS function.

    Let’s say we want to horizontally reverse (or flip) the order of the days and names in the rows shown in the sheet above.

    To do this, we can adapt our formula used to flip our column data, to do the same for rows. Instead of ROWS, we used COLUMNS to return the number of columns in our range.

    The definition of the COLUMNS function is given below.

    COLUMNS

    Returns the number of columns in an array or reference.

    Sample Usage

    COLUMNS(A9:W62)

    COLUMNS({1,2,3,4,5})

    Syntax

    COLUMNS(array)

    The COLUMNS function syntax has the following argument:

    • Array    Required. An array or array formula, or a reference to a range of cells for which you want the number of columns.

     

    Our formula now becomes =INDEX($A$1:$G$2,0, COLUMNS(A1:$G$2)), where the COLUMNS function counts how many rows from A1 (the leftmost row) to $G$2 (the rightmost row).

    Note also, that the row index, the second parameter in the INDEX function call, is explicitly set to 0, so that we flip both row 1 and row 2.

    Using the fill handle, we can propagate the formula to the remaining cells in the row, up to cell G4.

    Excel will once again adjust any relative cell references in the formula.

    The result is we have in rows 4 and 5, the reverse of rows 1 and 2.

    Conclusion

    As we’ve seen, Excel can only directly sort columns, and even then they must already be sorted.

    However, with a bit of ingenuity using a helper column, we can sort data that has no sort order.

    This method will sort the original data directly.

    We can also sort with a formula with function calls, specifically, using the INDEX and ROWS functions.

    This way, we leave the original column data intact and create new columns that contain the flipped data.

    Excel cannot sort row data, even with a helper row.

    Excel’s sort functionality only works on columns.

    However, a formula can be used, but this time using the INDEX and COLUMNS functions.

    As with columns, the formula method will create additional rows with the flipped data and the original rows left intact.

    As always, there are enough tools and functionality built in to Excel to achieve even the most defiant of tasks. We hope this tutorial on How to Flip or Reverse Data in Excel was helpful to finishing your task!

    Share. Twitter LinkedIn Email Telegram
    Avatar photo
    Constantin Kioulafas
    • LinkedIn

    Costas has a wide range of experience in Information Technology covering computer hardware, programming, telecommunications, networking, web services, and general IT support. He's worked in various roles such as PHP programmer and web developer, technical and desktop support, hardware repair, system administration. Costas has excellent background in Microsoft Windows and Office Suite (Excel, Word, Powerpoint, etc), as well as a thorough understanding of Networking and Hardware maintenance.

    Related Posts

    How to Subtract in Google Sheets: Complete Guide

    July 31, 2024

    How to Convert Column List to Comma Separated List in Excel

    July 24, 2024

    How to Find the Last Monday of the Month in Excel

    July 24, 2024

    Convert Bytes to MB or GB in Excel: 3 Methods!

    July 24, 2024

    How to Remove Characters from Right in Excel

    July 30, 2023

    How to Create a Stem and Leaf Plot in Excel

    January 10, 2023
    Add A Comment

    Comments are closed.

    Latest

    Nvidia Stock Soars to New Record at $219.44 Ahead of May 20 Earnings

    May 12, 2026

    Rocket Lab Shares Surge Past $120 Following Wave of Analyst Upgrades

    May 12, 2026

    GM Shares Decline Following 600 IT Layoffs Amid Strategic AI Workforce Transformation

    May 12, 2026

    SES Delivers €847M Q1 Performance as Intelsat Integration and Aviation Deals Fuel Expansion

    May 12, 2026

    Trump Dismisses Iran Peace Proposal — Oil Markets React as Hormuz Remains Restricted

    May 12, 2026
    • Facebook
    • Twitter

    Latest Reviews

    Meta Platforms Shares Tumble 8% Despite Strong Q1 Performance Amid AI Investment Surge

    April 30, 2026

    Flush.com Review: Casino & Sportsbook With 275% Welcome Bonus

    March 7, 2026

    Katsubet Review: Crypto Casino With 300% Welcome Bonus & Free Spins

    March 7, 2026

    7Bit Review: Crypto Casino With 325% Bonus & 250 FS

    March 7, 2026

    Mega Dice Review: Crypto Casino With 200% Bonus & 50 Free Spins, Legit?

    March 7, 2026


    Home / Privacy Policy / Terms & Conditions

    Computing.net © 1996 - 2026 Kooc Media Ltd. All rights reserved. Registered Company No.05695741

    Type above and press Enter to search. Press Esc to cancel.