Written by Allen Wyatt (last updated March 1, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
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.png" 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:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9205) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, 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.
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!
Macros are a great way to process information in a worksheet. Part of that processing may involve moving graphics around ...
Discover MoreIf you want to include a large number of images in your worksheet, you may also want a way to automatically add those ...
Discover MoreGraphics are a great addition to a worksheet, but there may be times when you don't want them printed. The easy way to ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments