Written by Allen Wyatt (last updated February 26, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003
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.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3222) 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: 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!
A common way of representing data is to use a Venn diagram. Unfortunately, Excel doesn't have a precise way of creating ...
Discover MoreWant to "see through" an image you place on a worksheet? You can do so by using the steps in this tip.
Discover MoreIf you need to create a chart that uses logarithmic values on both axes, it can be confusing how to get what you want. ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-02-01 06:43:05
Pabodha
Thank you.. Its working for me.
2017-07-09 22:16:56
Henry Gregory
Hi. Thanks for all the useful tips on excel. I am wanting to change the logo on all my worksheets from our old logo to the new one. I can use the above macro to put the new logo in but is there a way to quickly delete the old logos from all worksheets in cell A1?
2016-09-08 13:53:19
Mohamed Elshabrawy
it puts the photo at left upper corner but i defined the location to past in M3 or M20 or M39. all photo are in the same location at the upper left corner.
2015-05-04 01:37:53
Michael Oloishuro lenenkokuai
Hi,
I would really like to access the book - Microsoft Excel 2013 Data Analysis and Business Modeling, but do not know how. I am in Nairobi, kenya.
Regards
Michael
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments