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

by Allen Wyatt
(last updated October 16, 2021)

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

Listing All Styles in the Style Drop-Down List

Want to see all the built-in styles in the Style drop-down list? Here's the quick way to do it.

Discover More

Deleting Everything Up to a Character Sequence

Sometimes you have too much information in a cell and you need to "pare down" what is there to get to the info you really ...

Discover More

Controlling Sorting Order

When you sort information either in a table or the body of you document, Word follows a very specific set of rules to do ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Editing Graphic Objects

Want to change the way that a graphics object appears in your worksheet? You need to edit it, then, using the techniques ...

Discover More

Using WordArt in Excel

The WordArt program has been available in Office for a long, long time. It allows you to (as the name implies) create art ...

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 seven less 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.