How to Get a Text Box Linked to Cell in Excel (4 Examples)

If you are looking for ways to have a text box linked to a cell in Excel, then you will find this article helpful. The advantage of linking a cell value to a text box is that when the value of this cell changes, the value of the text box will update automatically. So, let’s get into the main article.


How to Get a Text Box Linked to Cell in Excel: 4 Suitable Examples

Here, we have a list of products with their sales values, and profits or losses. Using this dataset, we will link a text box with a cell that may contain the total sales value, profit, or loss value.

excel text box linked to cell

For creating this article, we have used the Microsoft Excel 365 version. However, you can use another version according to your necessary.


Example-1: Linking a Single Cell to a Text Box in Excel

In this section, we will link a textbox to the total sales value of cell C13.

excel text box linked to a single cell

Step-01:

In this step, we will insert a text box.

  • Go to the Insert tab >> Text group >> Text Box.

text box

  • Drag the following indicated symbol to the right and down.

Then, the following textbox named TextBox 1 will appear.

Step-02:

Now, we will link up the value of cell C13 with this newly added textbox.

  • Select the textbox and then type the following formula in the formula bar.
=$C$13

excel text box linked to a single cell

  • Press ENTER.

In this way, you will get the total sales value inside the textbox.

  • After doing formatting, like increasing the font size, changing the background color, etc. we have got the following output.

excel text box linked to a single cell


Example-2: Linking Multiple Cells to a Text Box

In this section, we will link the values of cells B13 and C13 in a text box by joining these values with the help of the CONCATENATE function.

excel text box linked to multiple cells

Steps:

  • Follow Step-01 of Example-1 to draw the following text box.

  • Type the following formula in cell B14.
=CONCATENATE($B$13, " ",$C$13)

Here, the CONCATENATE function will join the values of the cells $B$13 and $C$13 with a blank.

formula

  • Now, select the textbox and type the following formula in the formula bar.
=$B$14

excel text box linked to multiple cells


Example-3: Formatting Values of a Linked Cell in an Excel Text Box

Here, we will incorporate the formatting with a cell value that was missed in Example 2. For this purpose, we will use the TEXT function with the ampersand operator.

Formatting Values of a Linked Cell in an Excel Text Box

Steps:

  • Type the following formula in cell B15.
="The Total Sales Value is "&TEXT(C13,"$##,##0.00")

Here, the TEXT function will change the format of the number in cell C13 to $##,##0.00 format.

formula

  • Follow Step-01 of Example-1 to draw the following text box.

textbox

  • Now, select the textbox and type the following formula in the formula bar.
=$B$15

  • After pressing ENTER, and doing some formatting, we will get the following textbox linked up with multiple cell values with formatting.

Formatting Values of a Linked Cell in an Excel Text Box

Read More: Formatting Text Box in Excel: All Properties to Explore


Example-4: Using IF Function in a Text Box Linked to a Cell for Multiple Conditions

Here, we have the total value in cell D13, which is the summation of all the profits or losses. If the total value is a positive number, then we will show the positive number, indicating it as profit. Otherwise, for a negative number, we will show this number indicating it as a loss. For these conditions, we will need to use the IF function in a cell, and then we will link it with a text box.

Using IF Function in a Text Box Linked to Cell for Multiple Conditions in Excel

Steps:

  • Type the following formula in cell B15.
=IF(D13<0, "The Loss value is "&TEXT(-D13,"$##,##0.00")," The Profit Value is "&TEXT(D13,"$##,##0.00"))

Here, D13<0 is the logical condition, and when this condition is TRUE we will get the loss value, otherwise the profit value.

formula

  • Follow Step-01 of Example-1 to draw the following text box.

  • Now, select the textbox and type the following formula in the formula bar.
=$B$15

Using IF Function in a Text Box Linked to Cell for Multiple Conditions in Excel

  • After pressing ENTER, and doing some formatting we will get the following textbox linked up with multiple cell values with formatting.

If you want to you can hide the row with the formula with which we have linked our textbox. As you can see, it is not affecting our main textbox.

Using IF Function in a Text Box Linked to Cell for Multiple Conditions in Excel

Read More: How to Align Text Boxes in Excel


How to Use ActiveX Control Text Box to Link a Cell in Excel

Here, we will link up the total sales value of cell C13 with the ActiveX Control Text Box.

Utilizing ActiveX Control Text Box to Link a Cell in Excel

Steps:

  • Go to the Developer tab >> Insert group >> Text Box (ActiveX Control).

textbox

  • Drag the plus symbol down and to the right.

Then, the following textbox will appear, TextBox1.

textbox1

  • Now, right-click on the sheet name and choose the option View Code.

view code

Afterward, you will be taken to the Visual Basic Editor window.

  • Type the following code.
Sub link_txtbox()
TextBox1.Text = Range("C13").Value
End Sub

code

  • Press F5.

Eventually, the value of cell C13 will be linked with the textbox.

Utilizing ActiveX Control Text Box to Link a Cell in Excel


Practice Section

To practice by yourself, we have created a Practice section on the right side of each sheet.

practice


Download Practice Workbook


Conclusion

In this article, we have discussed various ways to have a text box linked to a cell in Excel. Hope these methods will help you a lot. If you have any further queries, then leave a comment below.


Related Articles


<< Go Back to TextBox | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo