We’ve heard from many of you that it can be difficult to scroll through a worksheet with large cells and view all the data. Excel automatically snapped to your top-left cell when you scrolled. Though you might think this is an easy fix, simply requiring the alteration of a few lines of code, there’s actually a lot more to it. We discovered that this change has many effects on Excel, including freezing panes as well as resizing rows and cutting and pasting. It also affects cell styles, comments, filtering, cell styling, filling, and filtering.
How it works
When you’re scrolling in a sheet with very large cells, the way Excel for Windows snapped to the grid made it hard to view your data. Many of you requested that we improve the way this works, and that’s just what we’ve done. We fixed the issue by making the scrolling much smoother—there are 2 parts to this update.
- First, it’s smoother during the scroll when using either the mouse wheel* or the scrollbars (touch screen and touch pad already scrolled smoothly).
- Second, and most importantly: You can stop scrolling half-way through a row, column, or row., and Excel won’t force you to go any further than you want.
|* Depending on the mouse or touch pad you’re using, you may not be able to scroll one pixel at a time. If you don’t have a “precision” mouse or touch pad, each movement will be based on the height of one line of text. If Windows allows you to move 1 line per click of the scrollwheel, it will move by each line of text and not by 1 row in your worksheet.|
Things to Try
- Increase the height of rows in your spreadsheet. Scroll using your mouse wheel, touch pad, or keyboard to see if you can stop at the end of a row without snapping to its top.
- Drag the scrollbar to see how precise you can scroll and where you can stop.
Want to learn more?
Excel will scroll more smoothly, that’s all. But we wanted to share more details about this improvement. It gives a fascinating glimpse at the complexities of Excel, which has been around for decades. Many who’ve asked for Excel to stop snapping when you’re trying to scroll just a little have also asked why this wasn’t done a long time ago. It should be easy to remove a few lines code that causes the sheet’s snapping. Right? It would be so simple. While it may seem easy to smooth things out and not snap, there are some side effects. We discovered that Excel was affected by this change.
There were two main issues that we found. The first was the inability to snap to the edges and the second was the inability of scrolling smoothly. One set of issues dealt with the positioning of objects on the sheet, and the other set of issues related to how objects are displayed while you’re scrolling.
To understand why there were issues with positioning objects on the sheet, it’s helpful to know that the position of the sheet (which cell is in the top-left corner of the visible area) is fundamental to just about everything that gets displayed in Excel. Excel calculates the position at which a chart should be displayed, based on its distance from the top-left cell. Calculations such as this were designed with the assumption that the sheet would always be on the edge a row or column. Because smooth scrolling allows for the sheet to be positioned halfway through rows and columns, these calculations needed to be updated in order to prevent your chart from appearing in the wrong spot. There are calculations that can be used to determine the position of objects and screen elements while scrolling. Many of these calculations assumed Excel would always be neatly snapped to cell edges. To make this a smoother experience, we needed to develop new methods to calculate these positions in an easier way.
We also discovered issues with the location of the mouse and touch points within the sheet. There are calculations to determine where you’re clicking or pointing in Excel. These calculations assume that the sheet would be snapped. This could mean that your click might not reach what you expected. You might click on one cell, but a new cell would be selected.
The same thing applies to your touch screen. Excel calculates where you touched and assumes that the sheet will be snapped. One issue we found was that if we scrolled partway through a row and tried to draw on the sheet, there would be a gap near the bottom of the sheet where we couldn’t draw anything. The gap was exactly the height of the section of the top row that was hidden from view.
These are just some examples. However, the graphic below shows the broad-ranging effects of this change. It highlights all the Excel functions that could be affected by the sheet not being held straight to the edge.
The diagram below shows that with smooth scrolling, the sheet can be scrolled partway through a row and column, which creates an “offset” distance both horizontally and vertically. This offset was impossible because the sheet was always snapped to one edge of a row or column. The calculations of the screen’s position were straightforward. Now the calculations need to deal with the offset, so it’s significantly more complicated.
We found in early testing that some things just didn’t look or work as expected, so we realized this was not going to be a simple or straightforward change. Excel’s entire functionality could be affected, as indicated by the graphic. Therefore, we had to carefully examine each section of the app. As you might expect, fixing a problem can sometimes have unintended consequences. Sometimes we had no choice but to take a step back in order to find a solution that would not create more problems.
Another consideration is the variety of different ways that you can scroll in Excel – mouse wheel, touch pad, touch screen, scroll bar drag, scroll bar buttons, selection drag, and more. These changes may have an impact on each scroll method. We spent time optimizing the code for each scrolling mode to reduce the differences. This means that a problem with one scrolling method could be fixed for all. Although it was a worthwhile effort, it delayed Smooth Scrolling’s release.
Scrolling is an integral part of Excel. For this reason, we had to be very careful at every step of the way to ensure that while we’re making a big improvement, we don’t miss something important. It was a classic “peeling the onion” story in software development – the more layers that you uncover, the more you find. Now we’ve peeled all the layers, we expect it to be smooth scrolling into the future.
This feature is available for Insiders on Windows with Beta Channel, Current Channel Preview with Version 2109 (Build 1433.20000) or later. To ensure that things work properly, features are gradually enabled over time.