Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Magnifying Only the Current Cell.

Magnifying Only the Current Cell

by Allen Wyatt
(last updated September 3, 2015)

2

Brian asked if there is a way in Excel to magnify the contents of the current cell. He's working on a worksheet which needs to be at a low zoom setting (30% or so) to see the whole sheet. As different scenarios are run, cells change color depending on the result. Brian can easily see which cells he needs to investigate, but he can't read them because of the zoom setting. He normally changes the zoom, reads the answer, and zooms back out to run another scenario. It would be much easier if only the current cell (the one selected) were magnified to a readable level.

There is no built-in method in Excel to accomplish this selective method of zooming, but there are a couple of workarounds you can use. One such workaround is to use a macro that displays the value in the active cell in a message box. Such a macro is easy to add to the worksheet module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    MsgBox ActiveCell.Address & ": " & ActiveCell.Value
End Sub

Every time you select a different cell in the worksheet, the macro pops up a message box that shows the contents of that cell. This solves the problem, but it can get tiresome to continually close message boxes every time you change which cell is selected.

You could also create a macro that simply changed the font size of whatever cell is currently selected. The following simple macro, added to the worksheet module, looks at the currently selected cell and increases its font size by 500%.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    FontSize = ActiveCell.Font.Size
    LargeSize = FontSize * 5
    Cells.Font.Size = FontSize
    ActiveCell.Font.Size = LargeSize
End Sub

The utility of such a macro will depend, of course, on how you have the height and width of the selected cell formatted. If they are static heights and widths, it is possible that increasing the font size will make the cell contents unreadable. If the height and width are dynamic, then the contents should still be quite readable.

Still another approach is to create your own zoomed-in picture of each cell as it is selected:

Private Sub ZoomCell(ZoomIn As Single)
    Dim s As Range
    Set s = Selection

    'Get rid of any existing zoom pictures
    For Each p In ActiveSheet.Pictures
        If p.Name = "ZoomCell" Then
            p.Delete
            Exit For
        End If
    Next

    'Create a zoom picture
    s.CopyPicture Appearance:=xlScreen, _
      Format:=xlPicture
    ActiveSheet.Pictures.Paste.Select
    With Selection
        .Name = "ZoomCell"
        With .ShapeRange
            .ScaleWidth ZoomIn, msoFalse, _
              msoScaleFromTopLeft
            .ScaleHeight ZoomIn, msoFalse, _
              msoScaleFromTopLeft
            With .Fill
                .ForeColor.SchemeColor = 9
                .Visible = msoTrue
                .Solid
            End With
        End With
    End With
    s.Select
    Set s = Nothing
End Sub

In order to use the macro, you need to call it each time the selection in the worksheet changes. To do this, you add a small macro to the worksheet module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ZoomCell 6
End Sub

In this case, every time the cell selection is changed, the ZoomCell macro is run to create a picture that is six times the size of the original. If it gets bothersome to have the picture automatically change every time you select a different cell, you could do away with the trigger macro in the worksheet module and modify the ZoomCell macro so that it runs whenever you initiate it, perhaps with a shortcut key that you set up.

Sub ZoomCell()
    Dim s As Range
    Dim ZoomIn As Single
    Set s = Selection
    ZoomIn = 6

    'Get rid of any existing zoom pictures
    For Each p In ActiveSheet.Pictures
        If p.Name = "ZoomCell" Then
            p.Delete
            Exit For
        End If
    Next

    'Create a zoom picture
    s.CopyPicture Appearance:=xlScreen, _
      Format:=xlPicture
    ActiveSheet.Pictures.Paste.Select
    With Selection
        .Name = "ZoomCell"
        With .ShapeRange
            .ScaleWidth ZoomIn, msoFalse, _
              msoScaleFromTopLeft
            .ScaleHeight ZoomIn, msoFalse, _
              msoScaleFromTopLeft
            With .Fill
                .ForeColor.SchemeColor = 9
                .Visible = msoTrue
                .Solid
            End With
        End With
    End With
    s.Select
    Set s = Nothing
End Sub

A final option is to step outside of Excel entirely and rely on Windows. One of the accessibility tools provided with the operating system is called Magnifier. The program magnifies the area near the mouse pointer, overlaying another area of the screen with the enlarged image. You can use this tool by choosing Start | All Programs | Accessories | Accessibility | Magnifier. You'll see the magnified area appear at the top of your screen, and a dialog box that allows you to set different options for the program. When you no longer need the magnification, you can turn it off by clicking Exit on the dialog box.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3114) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Magnifying Only the Current Cell.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Signing a Protected Form

Tablet PCs are great for some uses, such as signing forms developed in Word. You may run into a problem with getting the ...

Discover More

Squaring Table Cells

Inserting a table is fast and easy in Word. You may want to make sure that the cells in the table are as square as possible. ...

Discover More

Writing a Macro from Scratch

Creating macros can help extend what you can do in Word. If you work with macros, you know that creating macros from scratch ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

MORE EXCELTIPS (MENU)

Noting the Workbook Creation Date

You may want to add, to your worksheet, the date on which a particular workbook was created. Excel doesn't provide a way to ...

Discover More

Running a Macro when a Workbook is Closed

One of the automatic macros you can set up in Excel is one that is triggered when a workbook is closed. This tip explains how ...

Discover More

Making a Cell's Contents Bold within a Macro

When your macro is processing information in a worksheet, do you need to periodically make the contents of a cell bold? You ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 8?

2016-08-04 11:14:09

wilkisa

This is a great tip but I'm struggling to modify according to my user's needs.

He has a spreadsheet that is constantly updating market data, in that every few seconds a cell value changes. He wants the cell to magnify every time the value changes. He may not even be clicked into the workbook but it is open on his screen. Data is being pulled in from an internet source. He wants the change to magnify for 5 seconds then resume normal font size.

The code I have (thank you!) is:
***
Private Sub Worksheet_Change(ByVal Target As Range)

Dim RTDRng As Range

Set RTDRng = Range("B2:D4")

ActiveSheet.Cells.Font.Size = 12

FontSize = ActiveCell.Font.Size
LargeSize = FontSize * 3
Cells.Font.Size = FontSize
ActiveCell.Font.Size = LargeSize
Application.Wait (Now + #12:00:05 AM#)

ActiveSheet.Cells.Font.Size = 12

End Sub
***
but it does nothing so I know I'm not going the right direction.

Can you please tell me how to tweak this so that it will work?

Thanks,
Shirlene


2016-03-14 08:07:44

MIHA

WHY I HAVE "TYPE MICMATCH" PROBLEM WHEN DEBUG :
s.CopyPicture Appearance:=xlScreen, _
?


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share