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

Changing Body Text to a Heading

When working on a document in Outline view, you may need to change regular body text to a heading in the outline. It's ...

Discover More

Creating a Letterhead Template

Word is often used to write all sorts of letters. You may want to create a template that makes creating your letters ...

Discover More

Leaving Trace Precedents Turned On

The Trace Precedents auditing tool can be quite helpful in seeing which cells "feed into" a particular formula. The ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Pop-Up Comments for Graphics

Excel allows you to add comments to individual cells in a worksheet, but what if you want to add comments to graphics? ...

Discover More

Inserting a Watermark Behind Merged Cells

If you have a group of merged cells into which you want a user to enter information, you may want some sort of ...

Discover More

Setting the Default Fill Color for a Shape to None

When you insert a shape into a worksheet, Excel does some preliminary formatting on that shape. You can subsequently make ...

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?

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.