Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Pasting a Graphic to Multiple Worksheets.

Pasting a Graphic to Multiple Worksheets

Written by Allen Wyatt (last updated April 13, 2019)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


1

Marty has a series of workbooks, some with as many as 50 worksheets. He needs to paste a graphic (a company logo) into the same spot on each worksheet. He tried to do this by selecting all the worksheets and then doing the pasting, but that didn't seem to work on multiple worksheets like regular editing does.

Marty is right; trying to paste a graphic when you have multiple worksheets selected doesn't work. When you try, Excel tells you that it cannot make the paste, but if you then select just a single worksheet you can paste quite nicely.

Instead, you need to use a macro to do the pasting. Assuming that the graphic has already been copied to the Clipboard, you can run a macro such as the following:

Sub InsertLogo1()
    Dim shtSheet As Worksheet

    Application.ScreenUpdating = False
    For Each shtSheet In Worksheets
        With shtSheet
            .Activate
            .Range("A1").Select
            .Paste
        End With
    Next
    Set shtSheet = Nothing
    Application.ScreenUpdating = True
End Sub

The macro steps through each worksheet in the workbook and pastes the graphic into cell A1. If you want to use a different cell, then all you need to do is modify the line that selects the cell.

If you don't want to copy the graphic to the Clipboard ahead of time, you can use a macro such as the following to insert the graphic directly from an image file:

Sub InsertLogo2()
    Dim strPath As String
    Dim shtSheet As Worksheet

    strPath = "C:\GraphicFolder\PictureName.bmp"

    For Each shtSheet In Worksheets
        shtSheet.Activate
        Range("A1").Select
        ActiveSheet.Pictures.Insert (strPath)
    Next shtSheet
    Set shtSheet = Nothing
End Sub

You can, of course, modify the path to the graphic file and the cell at which the file is pasted into the worksheets. If desired, you could use the following variation that displays a standard Windows dialog box to select the graphic you want to insert:

Sub InsertLogo3()
    Dim strPath As Variant
    Dim shtSheet As Worksheet
    Dim sTemp As String

    ' Set the file type
    sTemp = "Graphics Files (*.jpg; *.bmp; *.gif; *.tif; *.png)"
    sTemp = sTemp & ", *.jpg; *.bmp; *.gif; *.tif; *.png"
    strPath = Application.GetOpenFilename(sTemp)
    If strPath <> False Then
        For Each shtSheet In Worksheets
            shtSheet.Activate
            Range("A1").Select
            ActiveSheet.Pictures.Insert (strPath)
        Next shtSheet
        Set shtSheet = Nothing
    End If
End Sub

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9205) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Pasting a Graphic to Multiple Worksheets.

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

Changing Default Tab Stops

If you don't explicitly set tab stops in a paragraph, Word relies upon a default tab stop distance. You can adjust that ...

Discover More

Dealing with the X of Y Bug

Have you ever printed a document, only to see that the page numbers are incorrect on the printout? If so, it could be due ...

Discover More

Turning Off Worksheet Tabs

Look at the bottom of a worksheet and chances are you will see tabs for all the worksheets in the current workbook. Want ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Inserting a Picture in Your Worksheet

Worksheets can contain more than just text and numbers. Here's the low-down on the different types of pictures you can ...

Discover More

Placing a Picture in a Comment

When editing a worksheet, you can place comments or notes that are associated with individual cells. If you want, you can ...

Discover More

Images Pile Up when Filtering

If you have a worksheet that has numerous pictures in a column, you may get an unwanted surprise when you try to filter ...

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

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}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. 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 four minus 0?

2019-04-13 09:06:38

Willy Vanhaelen

No need to activate each sheet and then select cell A1 and paste the picture.

Here is a macro, less than half the size of this tip's first one, that does the job "behind the scenes" and thus faster:

Sub InsertLogo1()
Dim shtSheet As Worksheet
For Each shtSheet In Worksheets
shtSheet.Paste Destination:=shtSheet.Range("A1")
Next
End Sub


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

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.