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: Pulling AutoShape Text from a Worksheet Cell.

Pulling Text from a Cell and Placing It in a Shape

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


5

Shapes are a great way to easily add simple graphics to your worksheets. Better still, shapes are like text boxes, in that they can contain text.

If you know how to add text to a text box, you already know how to add text to a shape. What you may not know how to do is to make that text dynamic, so that it is based on the text stored in a cell of your worksheet. Follow these steps:

  1. Select the shape that you want to contain the text. When it is selected (by clicking it once with the mouse), you'll see small selection handles around the exterior of the shape.
  2. Click once in the Formula bar.
  3. Type an equal sign and then click on the cell that contains the text you want in the shape.
  4. Press Enter.

That's it; the text in the shape is now tied to the text of the cell you specified in step 3. If you change that text, then the text in the shape changes, as well.

You should note that it is only the text of the cell that appears in the shape; Excel doesn't reflect, in the shape, any formatting that you may have applied to the text in the worksheet. If you want to format how the text appears in the shape, you'll have to use the formatting tools that Excel provides for working with shapes.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9840) 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: Pulling AutoShape Text from a Worksheet 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

Odd & Even Headers and Footers

Adding a running header or footer to a document can be a nice touch. If you want, you can even tell Word to use a ...

Discover More

Disabled Macros

Do your macros seem to be disabled on your new machine? It could be because of the security settings in Excel. Here's ...

Discover More

Read-Only Embedded Fonts

If you receive a document from somebody else, you might not be able to edit it if the document contains fonts that you ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Resize Graphics Outside of Excel

Graphics are a common addition to almost any workbook. If you need to change the size of your graphics (which Excel lets ...

Discover More

Non-Tiled Background Pictures

Background pictures are repeated over and over again (tiled) by Excel. If you want them to not be tiled, you may be out ...

Discover More

Deleting All Graphics

Graphics can really add pizzazz to a worksheet, but they can also present some drawbacks. If you want to get rid of all ...

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 two more than 7?

2021-11-08 09:32:47

Mike D.

@Michael

If you are wanting a macro to do this I am assuming this will happen more than once in your sheet.
If that is the case I would suggest adding an 'Input Box' to J.Woolley's code.
Then you can use that variable in the code: ActiveSheet.Shapes(Box_I_Want_Change).Select


2021-11-06 12:39:03

J. Woolley

@Michael
Try this:

Dim Temp As Range
Set Temp = Selection
ActiveSheet.Shapes("Blank11").Select
Selection.Formula = "=Letter"
Temp.Select

See https://sites.google.com/view/MyExcelToolbox/


2021-11-05 12:02:47

Michael

That's great!!! But I don't want to select the shape first. I simply want to refer to the particular shape in VBA and have the text from a certain cell to be written in said shape.

if shape was named "Blank11" and Range("Letter") contained the text, how would I code for this? Emphasize that I DO NOT want to select "Blank11" first.


2021-10-18 16:06:23

Mike D.

@Roy
Click on a shape you wish to format and look at your Tab menus and you will notice a new tab, Shape Format.
Click on it and all of your object formatting tools will appear.

This tab is only visible when an object is selected.


2021-10-16 09:59:54

Roy

"... you'll have to use the formatting tools that Excel provides for working with shapes."

Um, yes. And... where are those formatting tools?

Experimenting some, I found a couple ways to format. Intriguingly, both seemed to require I delete the cell reference.

Once deleted, the last text it had shown remained as pure text. If I either cleared that out (shapes are testy about the precise way that's done, almost as bad as PDF's are), I could directly apply formats via right-click|format. And once I put the cell reference back in, it applied to everything that put in.

If I left the text, I could NOT get right-click|format to work at all, not even anything coming up with right-clicking. But if I highlighted it all and pressed Ctrl-1, I got lots of formatting options. After choosing and saving them, putting the reference back in restored it to lovely, lovely working AND with the formatting.

But nothing at all worked without the reference being removed first.

New and wonderful for me. Fixes a major hassle for me with a document the boss wanted to be as identical to a program's produced output as possible and that has some objects that may or may not be Shapes, but apparently act like them in some ways as this worked in one of them. So, while I now have 100% of what I ever wanted due to this Tip, thoughts for experiments come to mind and hopefully I shall get the chance to do them, and more soon. If so, I'll report back anything I find interesting and/or useful.

One, I just ran. Was wondering how to use a formula. Of course, it does turn out a formula in the referred to cell works as it is doing the standard thing of taking the formula's output as the value of the cell reference and putting ITS text in the Shape. But a formula in the place of a simple cell reference generates an error that does not let one save said formula. Putting the formula in a Named Range and referring to the Named Range for the reference does not work either as Excel refuses to recognize the Named Range in the Shapes cell/editing bar/whatever.


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.