Arrow key scroll in Mac Excel

Ever been using Microsoft Excel on the Mac and found that when you use the arrow keys on the keyboard to move from one cell to the next, instead the whole worksheet scrolls?

This is actually a feature of Microsoft Excel carried over from the Windows version on which you press the Scroll lock key to enable or disable.  Older Macintosh computers had the F14 key mapped to the Scroll lock key of PC keyboard, so it was quite easy to enable or disable.  However newer Macintoshes no longer have a F14 key.

This makes disabling this feature tricky to say the least.

In the past I have attached an older Mac keyboard to my 2010 Macbook Pro and pressed the F14 key.  However for those of you who do not have ready access to such legacy keyboards, you can use a simple applescript application that I have written called Excel Scroll Lock.

What it does is “send” a Shift-F14 key press to Microsoft Excel as if you pressed the Scroll lock key, thus toggling on or off this function within Excel.

To use, simply download the application, unzip, and drag the application into your Applications folder.  Then run it.  You can alternatively download a disk image version of the application, and run without installing into your Applications folder.

For those interested in the applescript, it is shown below, and also included in the downloaded application bundle under the Contents/Resources/Scripts folder.  The script is also available on github – contributions welcome.

--Applescript to fix scroll-lock problem with Microsoft Excel on Mac OS
--Written by Damien Clark (https://damosworld.wordpress.com)
--Licenced under GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html)
--18th of June, 2012

--From time to time you may find that using the cursor keys in MS Excel for Mac will 
--scroll the worksheet, but not shift the selected cell.  This is a feature of Excel 
--that is enabled by pressing the Scroll Lock key.  On Macintosh computers once upon 
--a time, F14 was the equivalent key to Scroll lock on the PC.  Modern Macintosh 
--computers are no longer furnished with an F14 key, and while I am sure there is a 
--keyboard combination to emulate F14, I have yet to find it.  As a result, you can 
--find yourself stuck with this special scroll lock mode of Excel and it is very 
--frustrating.  This script effectively "sends" an F14 keypress to Microsoft Excel, 
--thus turning on or off this scroll lock feature.  So if you find yourself in this 
--situation, you can execute this program to toggle the feature on and off as 
--necessary.  Simply run the application and click OK.  

set returnedItems to (display dialog "Press OK to send scroll lock keypress to Microsoft Excel or press Quit" with title "Excel Scroll-lock Fix" buttons {"Quit", "OK"} default button 2)
set buttonPressed to the button returned of returnedItems

if buttonPressed is "OK" then
    tell application "Microsoft Excel"
        activate --Make it the active application to receive System keyboard events
    end tell
    tell application "System Events"
        key code 107 using {shift down} --Send the F14 key which is scroll-lock on Mac keyboards
    end tell
    activate
    display dialog "Scroll Lock key sent to Microsoft Excel" with title "Mac Excel Scroll-lock Fix" buttons {"OK"}
end if
Advertisements

30 thoughts on “Arrow key scroll in Mac Excel

Add yours

      1. I downloaded the zip, unzipped the file, and clicked ok to send scroll lock to excel, but I still can’t turn off scroll lock in excel. It slows down use of excel so much. Help! How do I turn this off????

  1. Thanks for the help. I downloaded your app, but I don’t know how to “unzip it” on my Mac and the computer won’t open it (run it) as it is. Can you help me?

    Thanks again,

    Ian

    1. G’day Ian,

      After downloading it, go to your Downloads folder and double click on the file. This will expand the zip file contents into another folder of the same name. The application is inside. Then you can double click on the application.

      Good luck.

      Damien.

  2. OMG. I want to thank you for this post. This feature has been driving me crazy. I must have pressed F14 by mistake and suddenly the excel sheet behaves as you described and I couldn’t figure out why. Now it’s resolved. THANK YOU!!!!

  3. Sounds great for everyone above. Didn’t work with Logitech K750 for Mac but script should be independent of kb. Either way, did not resolve.

  4. Thank you, Thank you, Thank you. This is amazing, I was going out of mind, couldn’t get the fn, shift #12 to work on my Mac. It kept taking me to the Widgits screen. Downloaded your script, dragged to Applications folder and frustration eliminated.

    1. I just tried myself using Firefox and Safari and I was able to download and unzip the file successfully. I too am now using 10.9.

      Were you using a stable Internet connection? Not sure what to suggest.

  5. had the same issue as Emyrose did: told me the file is damaged and move to trash. OS X 10.10; tried both Chrome and Safari. Neither worked… appreciate any insight!

    1. Hi Emyrose/Fred,

      I am flat out at work presently and haven’t had an opportunity to investigate further why you are getting this error. Once I’m on top of things at work, I’ll come back and take a look.
      Regards,
      Damien.

    2. Now that I have a bit more time, I have updated the script to include Mauricio’s fix with the shift key.

      This has been updated in the main article. Hopefully this will resolve the file is damaged error that some have experienced. There is also a disk image version that I have created, in case people are still having problems with the zip version.

      Check out the main article for the updates.

  6. In my system (OSX 10.95, Excel 14.4.8) I needed to edit the script to insert a Shift. The line:

    key code 107

    must become

    key code 107 using {shift down}

    Only then it worked for me.

    Thanks for your script!

  7. Hey Damian,

    I like the idea of your script, but it doesn’t work for me and I’m not technical enough to figure a work around.
    I’m using Excel – version 14.5.5
    Mac OS X Yosemite 10.10.5

    any help will be appreciated

    greg

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: