• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Excel Scroll and Sort Table

You are here: Home / Excel Charts / Excel Scroll and Sort Table
Excel scroll and sort table
February 6, 2019 by Mynda Treacy

Dashboards have limited space which is why an Excel scroll and sort table is super handy.

Scroll and sort tables allow you to embed an extract of data from a larger table in your Dashboard. Your user can scroll to see all the records and toggle which column to sort by and set the sort order, as shown below:

Excel scroll and sort table

Creating an Excel Scroll and Sort Table

Before we had the luxury of Dynamic Arrays, creating an Excel scroll and sort table was a complex task. It required multiple tables, formulas and helper columns, which I cover in detail in my Excel Dashboard course. But in this tutorial I want to show you how simple it is to create a scroll and sort table using the new Dynamic Array functions and functionality.

To be clear, the techniques in this tutorial will only work in Office 365 where you have the new Dynamic Array functions.

Note: At the time of writing Dynamic Arrays are only available in Office 365 and are currently in beta on the Insiders channel. We don’t have an ETA for when they will be available to all Office 365 users yet. And to be clear, Excel 2019 does not come with Dynamic Arrays. The only way to get them is with Office 365 …or wait until Excel 2022 (?) comes out.

Source Data

My 30 rows of source data is stored in an Excel Table called ‘Table1’:

excel scroll and sort data source

Formatting your data in an Excel Table isn’t strictly necessary, but it makes it quick and easy to write my formulas using the Table’s Structured Reference.

Excel Scroll and Sort Table Form Controls

The sort column and sort order are controlled using Radio Buttons and I used a Scroll Bar for the scrolling of the table.

excel form controls

Radio Buttons and Scroll Bars are Form Controls that allow the user to interact with your worksheet. Note: the up/down triangles are Symbols inserted in the cell.

Form Controls are found on the Developer tab:

excel developer tab

Click here for instructions if you don’t see the Developer tab.

The selection made in a Form Control is returned to a cell that you specify by right-clicking on the Form Control > Format Control > Cell Link:

excel form control cell link

You can see the Form Control selection results in the image below where the Sort Order button is displayed in cell I3, the Sort By is in cell I4 and the scroll bar position is in cell I5 (these results can also be hidden on another sheet. I've included them beside the table so you can see them in context):

excel form control output

When you place the Radio Buttons inside a Group Box, like I’ve done above, each button is given a number. For example, the first 'Order' Radio Button is selected and cell I3 contains 1. Likewise, the second 'Sort By' Radio Button is selected and cell I4 contains 2.

The Scroll Bar shows position 0 because it is at the top of the scroll bar.

Tip: the whole Radio Button frame must be inside the Group Box for it to form part of the group. If the outer edge of the Radio Button is outside the Group Box, it won’t be included.

excel form control alignment

Excel Scroll and Sort Table Formula

The table contains a single formula that detects the selections made in the Form Controls and returns an extract of the source data accordingly. It uses the INDEX, SORT, CHOOSE and SEQUENCE functions:

=INDEX( SORT(Table1, I4, CHOOSE(I3,1,-1)), SEQUENCE(10,1,I5+1,1), {1,2,3,4,5,6})

In English it reads:

SORT Table1 by the 'Sort By' column number displayed in cell I4 (which is the 'Sort By' Radio Button output), use CHOOSE* to return 1 for ascending and -1 for descending based on the order specified in cell I3 (which is the 'Order' Radio Button output), INDEX the table returned by SORT,  returning 10 rows starting at the row number in cell I5+1 (which is the Scroll Bar output) and increment by 1, and return columns 1 through 6.

And because it’s a dynamic array formula it spills the results to create a table 10 rows high and 6 columns wide:

Excel Scroll and Sort Table formula

*The SORT function requires 1 for ascending order and -1 for descending order. The Radio buttons return 1 for ascending and 2 for descending, so we use CHOOSE to return the correct value for the SORT function. Alternatively you could use SWITCH(I3,1,1,2,-1) to achieve the same result.

Conditional Formatting

The final touch is to add Conditional Formatting to highlight the selected ‘Sort by’ column.

excel conditional formatting

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook. Note: This is a .xlsx file. Please ensure your browser doesn't change the file extension on download.

Remember, only Office 365 users with Dynamic Arrays will be able to use this workbook.

Related Tutorials

I realise that you may not have access to Office 365 yet, but there are many other ways you can use Form Controls in earlier versions of Excel. Below are a few tutorials you might like to check out:

Form Controls

Toggle Conditional Formatting On and Off using Form Controls

Interactive Excel Charts

Excel Chart Highlighting
 

Please Share

If you liked this please share this tutorial with your friends and colleagues.

Excel scroll and sort table

More Excel Charts Posts

picture fill excel charts

Picture Fill Excel Charts

Using a stylish picture fill in your Excel Charts is a simple way to make your data visualizations more captivating and memorable
excel speedometer charts

Excel Speedometer Charts

How to build Excel Speedometer Charts or Gauge Charts as they're also know, why they are BAD and what to use instead.
burn up burn down charts

Excel Project Management Burn Down and Burn Up Charts

Excel Burn Down and Burn Up Charts are easy to make with line or scatter charts. They are useful for monitoring the progress of a project.
wee people font charts

Excel WeePeople Font Charts

Excel WeePeople Font Charts are a nice change from generic shapes for waffle charts, bar/column charts and more.
excel dot map charts

Excel Dot Map Charts

Interactive Excel dot map charts are not built-in, but with some creative use of Excel’s built-in tools we can create something unique.
Excel S Curve Charts

Excel S-Curve Charts

Easy Excel S-curve Charts made with PivotTables for project management. Track progress by including budget amounts.
chart axis switch

Excel Chart Axis Switch

Use radio button form controls to create an Excel chart axis switch enabling you to toggle pannel charts between same axis and own axis.

Excel Charts with Shapes for Infographics

Excel Charts with Shapes for Infographic styling and increased interest in your charts. Easy to insert but there are a few tricks required.
excel pyramid chart

Excel Pyramid Charts

Excel Pyramid charts are useful for visualising demographic data across multiple categories. Let’s look at 3 ways we can build them in Excel.

Highlighting Periods in Excel Charts

Highlighting Periods in Excel Charts helps your users interpret them more quickly and or focus their attention on a point or area.


Category: Excel Charts
Previous Post:Excel Five Star Rating ChartExcel Five Star Rating Chart
Next Post:Change PivotChart Aggregation Methods using Excel SlicersChange PivotTable Aggregation Methods using Excel Slicers

Reader Interactions

Comments

  1. another jim

    February 11, 2019 at 6:40 pm

    Hi Mynda et al,
    this really is so clever and imginative!
    unfortunately I don’t have this functionality yet to have a play with; so please tell me this:

    why can’t you use another SEQUENCE in the INDEX function instead of {1,2,3,4,5,6} for the column refs?

    I might have used 3-2*$I$3 instead of the CHOOSE function, but there’s no effective difference

    jim

    Reply
    • Mynda Treacy

      February 11, 2019 at 9:02 pm

      Hi Jim,

      Glad you like it 🙂

      You can use another SEQUENCE for the column array if you want, but since I didn’t need it to be dynamic I used an array constant.

      Mynda

      Reply
  2. Jim Compton

    February 10, 2019 at 12:01 am

    This is a great lesson/tool. I have used these methods in creating a summary report with several KPIs to the upper management (for a client). They were very impressed (wow factor !!) and went on to use the report for their management meetings! It was a little tricky to get set up initially (before dynamic arrays) but well worth the effort. Excellent!

    Reply
    • Mynda Treacy

      February 10, 2019 at 8:22 am

      Thanks, Jim. Glad you’ll be able to use it.

      Reply
  3. Søren V. Lund

    February 9, 2019 at 1:35 am

    Hi Mynda
    I placed in Denmark and only get #NAME? in the area A6 to O15.
    {=INDEX(_xlfn._xlws.SORT(Table1,I4,CHOOSE(I3,1,-1)),_xlfn.SEQUENCE(10,1,I5+1,1),{1,2,3,4,5,6})}

    I have this
    =INDEX($A$2:$A$4,MATCH(A6,$B$2:$B$4,0))
    from https://www.contextures.com/xlFunctions03.html
    Works fine.

    Any idea?

    BR Søren

    Reply
    • Catalin Bombea

      February 9, 2019 at 1:46 pm

      Hi Søren,
      As noted in the article,
      “At the time of writing Dynamic Arrays are only available in Office 365 and are currently in beta on the Insiders channel. We don’t have an ETA for when they will be available to all Office 365 users yet.”
      If a function is not available in your excel version, it will receive that prefix: _xlfn

      Reply
    • Mynda Treacy

      February 9, 2019 at 2:53 pm

      Hi Søren,

      As Catalin mentioned, the xlfn prefix is inserted when you don’t have the function in your version of Excel.

      The INDEX & MATCH formula you provided wont’ respond to changes in the sort order or sort by column. This is where the new SORT and SEQUENCE functions come into play.

      Mynda

      Reply
  4. Roger Govier

    February 7, 2019 at 11:50 pm

    Hi Mynda

    Absolutely superb use of the new Dynamic Array functionality to show a sorted subset of your data on a dashboard.
    I love your clever use of the form controls to change Sort direction and Sort column and the use of the Slider bar for determining the start position.
    This will be useful for a lot of people.
    Thanks for sharing.

    Reply
    • Mynda Treacy

      February 8, 2019 at 9:36 am

      Thanks for your kind words, Roger! It’s a honour to hear from a fellow MVP.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.