How to Flip Data in Excel Chart (5 Easy Methods)

Get FREE Advanced Excel Exercises with Solutions!

This tutorial will demonstrate how to flip data in an Excel chart. While dealing with lots of data or showing Excel in any report, flipping data can be very useful. Sometimes after doing lots of work, it seems that it will be more effective if the data is flipped. If you try to manually do that, it not only will kill time but will create the opportunity to make mistakes. So, we have to focus on learning flipping data.


How to Flip Data in Excel Chart: 5 Easy Methods

We’ll use a sample dataset overview as an example in Excel to understand easily. In this case, we have Salesperson in Column B and Sales in Column C. We will use this dataset to describe all the methods. If you follow the methods correctly, you should learn how to flip data in an excel chart on your own.

Methods to Flip Data in Excel Chart


1. Flipping Data Only Vertically

In this case, our goal is to flip data in an Excel chart only vertically. To do that we have to follow the below steps.

Steps:

  • First, go to selected data > Insert > 2-D Column options to create a chart.

Methods to Flip Data in Excel Chart

  • Then, you will the desired chart.

Methods to Flip Data in Excel Chart

  • After that, select the whole dataset and go to the Data tab.

Methods to Flip Data in Excel Chart

  • Next, in the Data tab, click on the Sort option.

Methods to Flip Data in Excel Chart

  • Afterward, the Sort dialog box will open on the screen.
  • Furthermore, select Sales in Sort by option and Largest to Smallest in Order option and press OK.

Methods to Flip Data in Excel Chart

  • Finally, you will get the desired result.

Methods to Flip Data in Excel Chart

Read More: How to Flip Data Vertically in Excel


2. Flipping Data Only Horizontally

Now, our aim is to flip data in an Excel chart only horizontally. It is similar to the previous method with a slight change. The steps of this method are.

Steps:

  • At first, create the data chart following the first method and you will the below chart.

Methods to Flip Data in Excel Chart

  • Next, select the dataset > Data > Sort options.

Methods to Flip Data in Excel Chart

  • Second, the Sort dialog box will open on your display. Click the Options to open the desired dialog box.

Methods to Flip Data in Excel Chart

  • Third, select the Sort left to right option in the dialog box and press OK.

Methods to Flip Data in Excel Chart

  • Fourth, select Row 4 in the Sort by option and press OK.

  • Last, you will get the desired result. In this case, after flipping you won’t find any graph in the chart.

Methods to Flip Data in Excel Chart

Read More: How to Flip Data Horizontally in Excel


3. Using INDEX Function

The INDEX Function returns a value or a reference to a particular cell. We will use the INDEX Function to flip data in Excel chart in the following way.

Steps:

  • To begin with, create the data chart following the first method and you will the below chart.

Methods to Flip Data in Excel Chart

  • insert the following formula in cell E5.
=INDEX($B$5:$C$11,ROWS(B5:$B$11),COLUMNS($B$5:B5))

Methods to Flip Data in Excel Chart

  • In addition, press Enter to get the desired result.

Methods to Flip Data in Excel Chart


4. Use of SORTBY Function

If you are using Microsoft 365 then, you will get an extra option called the SORTBY Function. Using this function is very helpful as it is much easier to under than the previous INDEX Function method. The steps of this method are described below.

Steps:

  • At first, create the data chart following the first method and you will the below chart.

  • insert the following formula in cell E5.
=SORTBY($B$5:$B$11,ROW(B5:B11),-1)

  • Then, press Enter to get the desired result.


5. Applying VBA Code

We can also flip data in an Excel chart by using the VBA code. VBA code is very efficient in flipping data in every situation. The steps of this method are.

Steps:

  • Firstly, create the data chart following the first method and you will the below chart.

  • Then, press Ctrl+F11 to open the VBA window and go to the Insert > Module options.

  • Secondly, insert the following code in the window.
Sub FlipData()
Dim TRw As Variant
Dim LstRw As Variant
Dim SrtNum As Integer
Dim LstNum As Integer
Application.ScreenUpdating = False
SrtNum = 1
LstNum = Selection.Rows.Count
Do While SrtNum < LstNum
TRw = Selection.Rows(SrtNum)
LstRw = Selection.Rows(LstNum)
Selection.Rows(LstNum) = TRw
Selection.Rows(SrtNum) = LstRw
SrtNum = SrtNum + 1
LstNum = LstNum - 1
Loop
Application.ScreenUpdating = True
End Sub

Methods to Flip Data in Excel Chart

  • Thirdly, press the Run option to use the code.

Methods to Flip Data in Excel Chart

  • Lastly, you will get the desired result.

Methods to Flip Data in Excel Chart


How to Reverse Axis in Excel Chart

In many cases, you need to reverse the axis of any Bar chart in Excel. To fulfill that, you have to follow the below steps.

Steps:

  • First, go to select data > Insert > 2-D Bar Chart options.

  • Second, you will get the desired chart.

  • Third, right-click on the y-axis of the chart and select the Format Axis option.

  • Fourth, the Format Axis option will come on the screen. Select the Values in reverse order option from the Axis Options.

  • Last, you will get the desired result.


Things to Remember

  • In the first two methods, we have flipped the data only vertically and horizontally individually. So, these methods are helpful while flipping data to one side only.
  • In the case of using the INDEX Function, you have to be careful about the selected cells otherwise it won’t work.
  • The SORTBY Function isn’t available in all office files. It is only available for Microsoft 365 users.
  • Using VBA code is the most efficient way among all the methods. But it is recommended to understand and apply it correctly.

Download Practice Workbook

You can download the practice workbook from here.


Conclusion

Henceforth, follow the above-described methods. Thus, you will be able to flip data in an Excel chart. Let us know if you have more ways to do the task. Don’t forget to drop comments, suggestions, or queries if you have any in the comment section below.


Related Article


<< Go Back to Excel Reverse Order | Sort in Excel | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Zehad Rian Jim
Zehad Rian Jim

Zehad Rian Jim is a dedicated professional with a BSc. Degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. He's good with Microsoft Office and has written more than 80 helpful articles for ExcelDemy in the last year. Now, he makes fun and easy-to-follow Excel tutorials for YouTube as part of the ExcelDemy Video project. Zehad loves figuring out Excel problems, and his passion for learning new things in Excel shines through in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo