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

We’ll use a sample dataset with Salesperson in Column B and Sales in Column C. We’ll flip the data in the dataset.

Methods to Flip Data in Excel Chart


Method 1 – Flipping Data Only Vertically

Steps:

  • Select the data.
  • Go to Insert and select 2-D Column next to Charts to create a chart.

Methods to Flip Data in Excel Chart

  • You will get a chart.

Methods to Flip Data in Excel Chart

  • Select the whole dataset and go to the Data tab.

Methods to Flip Data in Excel Chart

  • In the Data tab, click on the Sort option.

Methods to Flip Data in Excel Chart

  • The Sort dialog box will open on the screen.
  • Select Sales in Sort by option and Largest to Smallest in Order option and press OK.

Methods to Flip Data in Excel Chart

  • You will get the desired result.

Methods to Flip Data in Excel Chart

Read More: How to Flip Data Vertically in Excel


Method 2 – Flipping Data Only Horizontally

Steps:

  • Create the data chart by following Method 1.

Methods to Flip Data in Excel Chart

  • Select the dataset.
  • Go to Data and choose Sort.

Methods to Flip Data in Excel Chart

  • The Sort dialog box will open. Click Options.

Methods to Flip Data in Excel Chart

  • Select the Sort left to right option in the dialog box and press OK.

Methods to Flip Data in Excel Chart

  • Select Row 4 in the Sort by option and press OK.

  • You will get the desired result. You won’t get a graph in the chart.

Methods to Flip Data in Excel Chart

Read More: How to Flip Data Horizontally in Excel


Method 3 – Using the INDEX Function

Steps:

  • Create the data chart by following Method 1.

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

  • Press Enter to get the desired result.

Methods to Flip Data in Excel Chart


Method 4 – Use the SORTBY Function

If you are using Microsoft 365 then, you will get an extra option called the SORTBY Function.

Steps:

  • Create the data chart by following Method 1.

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

  • Press Enter to get the desired result.


Method 5 – Applying VBA Code

Steps:

  • Create the data chart via Method 1.

  • Press Ctrl + F11 to open the VBA window and go to the Insert and Module options.

  • 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

  • Press Run.

Methods to Flip Data in Excel Chart

  • You will get the desired result.

Methods to Flip Data in Excel Chart


How to Reverse an Axis in Excel Chart

Steps:

  • Select the data.
  • Go to Insert and select 2-D Bar Chart.

  • You will get a chart.

  • Right-click on the y-axis of the chart and select the Format Axis option.

  • The Format Axis dialog will open. Select the Values in reverse order option from the Axis Options.

  • 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.
  • When using the INDEX Function, you have to be careful about selecting cells.
  • The SORTBY Function is only available for Microsoft 365 users.
  • Using VBA code is the most efficient way among all the methods, but requires advanced knowledge of VBA to fix issues.

Download the Practice Workbook


Related Article


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

Get FREE Advanced Excel Exercises with Solutions!
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