Author: Oscar Cronquist Article last updated on February 13, 2023

This article demonstartes different techniques on how to take a screenshot of your worksheet. You can do that by simply pressing the PrintScreen key on your keyboard. Paste it into your favorite image editing software and you are done.

However, what if you want to take a screenshot of a large dashboard or a dataset?  Yes, you can zoom out to a certain extent but eventually the font size will be too small to read.

Believe it or not, Excel actually allows you to take a screenshot of the selected cell range, whatever size. It can be very useful as an attachment in an email when you don't want to send the entire workbook.

I'll also demonstrate a macro, later in this article, that automatically saves the screenshot to a folder you specify. There is a macro-enabled file for you to get at the end of this article.

Check out the macro category for more useful VBA subroutines.

Screenshot of a large cell area

Print screen the entire worksheet1

The image above shows a part of a data set containing random data, here is how to quickly select a larger data set without scrolling.

Press with left mouse button on and select any cell in the data set. Press shortcut keys CTRL + A, this selects the entire data set as long as data cells have no blank rows in between.

  1. Select the cell range you want to capture a screenshot of.
  2. Go to the "Home" tab on the ribbon.
  3. Press with left mouse button on the black arrow near the copy button, see image below.
    copy as picture
  4. A popup menu appears. Press with left mouse button on "Copy as picture..".
  5. A dialog box appears, here you can select if you want it "As shown on screen" or "As shown when printed".
    copy as picture1
    I will explain these settings in greater detail below.

Copy picture - Format Picture

If you select the radio button named "As shown on screen" you can choose from "Picture" or a "Bitmap". The "Picture" setting returns a terrible image, shown here:

picture setting

Copy picture - Format Bitmap

The "Bitmap" setting returns a much nicer looking image:

bitmap setting

The "As shown when printed" setting returns a really large image and I am not going to show the full-size image here to you, for obvious reasons.

Print screen the entire worksheet as shown when printed

The image above shows the dialog box when the radio button "As shown when printed" is selected. Format - Picture and Bitmap is greyed out.

Include row and column headings

It is possible to include headings but you need to select "As shown when printed" and then resize the picture in your image editing software.

  1. Go to tab "Page Setup" on the ribbon.
  2. Enable check boxes for Print "Grid lines" and Print "Headings"
    toggle headings and gridlines page layout
  3. Go to tab "Home".
  4. Press with left mouse button on the arrow near the copy button, see image below. A popup appears.
    Print screen the entire worksheet dialog box
  5. Press with left mouse button on "Copy as Picture...".
    Print screen the entire worksheet popup menu
  6. A small dialog box appears. Select radio button "As shown when printed".
    Print screen the entire worksheet as shown when printed
  7. Press with left mouse button on OK button.
  8. Paste the picture in your favorite image editing software which allows you to rescale the image to a smaller size.

Print screen the entire worksheet column and row labels

The image above shows a screenshot with settings "As shown when printed" resized to fit this webpage.

Copy picture VBA macro

What VBA code does the macro recorder create while taking a screenshot of a cell range?

Bitmap

Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap

Picture

Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture

Printer

Selection.CopyPicture Appearance:=xlPrinter, Format:=xlPicture

Print screen and save the picture to a folder automatically

This macro takes a screenshot of the selected cell range and saves the image to c:\temp\temp.gif.

'Name macro
Sub SavePicToFile()

'CopyPicture method with parameters xlscreen and xlBitmap using the selected cell range
Selection.CopyPicture xlScreen, xlBitmap

    'Hides alerts
    Application.DisplayAlerts = False

    'The SET statement allows you to save an object reference to a variable
    'Save a new chart object to variable tmp
    Set tmp = Charts.Add

    'The With ... End With statement allows you to write shorter code by referring to an object only once instead of using it with each property
    With tmp

        'Delete first series collection
        .SeriesCollection(1).Delete

        'Paste picture
        .Paste

        'Save to filename temp.gif in folder c:\temp with Filtername parameter gif
        .Export Filename:="C:\temp\temp.gif", Filtername:="gif"

        'Delete tmp object
        .Delete
    End With
End Sub

Where to put the code?

Print screen the entire worksheet VB Editor

  1. Press shortcut keys Alt + F11 to open the Visual Basic Editor.
  2. Press with left mouse button on "Insert" on the top menu, see image above.
  3. Press with left mouse button on "Module" to create a module. The module named Module1 is now visible in the Project Explorer window located to the left in the image above.
  4. Copy VBA code.
  5. Paste VBA code to empty module.
  6. Exit VB Editor and go back to Excel.
Note, save your workbook with file extension *.xlsm (macro-enabled workbook) to attach the VBA code.

How to run the macro?

Print screen the entire worksheet Macro dialog box

  1. Select the cell range you want to create an image of.
  2. Press Alt + F8 to run the "Macro" dialog box, see image above.
  3. Press with left mouse button on the name of the macro you want to run, in this case, press with left mouse button on "SavePicToFile".
  4. Press with left mouse button on "Run" button.
    The dialog box closes automatically and the macro is then rund.

Check folder c:\temp for an image named temp.gif.