# How to Link a Text Box to a Cell in Excel – 4 Examples

The dataset showcases a list of products with their sales values, and profits or losses.

### Example 1 –Â Linking a Single Cell to a Text Box in Excel

To link a textbox to the total sales value in C13:

Step 1:

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

• Drag theÂ symbol shown below to the right and down.

TextBox 1 will be displayed.

Step 2:

Link the value of C13 to the textbox.

• Select the textbox and enter the following formula in the formula bar.
`=\$C\$13`

• Press ENTER.

You will see the total sales value in the textbox.

• After formatting, this is the output.

### Example 2 –Â Linking Multiple Cells to a Text Box

Link the values of B13 and C13 to a text box using the CONCATENATE function.

Steps:

• Follow Step 1 in Example 1 to draw the text box.

• Enter the following formula in B14.
`=CONCATENATE(\$B\$13, " ",\$C\$13)`

The CONCATENATE function will join the values of \$B\$13 and \$C\$13 with a blank.

• Select the textbox and enter the following formula in the formula bar.
`=\$B\$14`

### Example 3 –Â Formatting Values of a Linked Cell in an Excel Text Box

Use the TEXT function with the ampersand operator.

Steps:

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

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

• Follow Step 1 in Example 1 to draw the following text box.

• Select the textbox and enter the following formula in the formula bar.
`=\$B\$15`

• After pressing ENTER, and formatting, you will see the textbox linked to multiple cell values with formatting.

### Example 4 – Using the IF Function in a Text Box Linked to a Cell for Multiple Conditions

The total value in D13 is the summation of all profits or losses.

To indicate profit as a positive number and loss as a negative number, use the IF function.

Steps:

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

D13<0 is the logical condition. When this condition is TRUE,Â the loss value is returned, otherwise the profit value.

• Follow Step 1 in Example 1 to draw the following text box.

• Select the textbox and enter the following formula in the formula bar.
`=\$B\$15`

• After pressing ENTER, and formatting, you will see the textbox linked to multiple cell values with formatting.

You can hide the row with the formula.

Read More: How to Align Text Boxes in Excel

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

Link the total sales value in C13 to the ActiveX Control Text Box.

Steps:

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

• Drag the plus icon down and to the right.

TextBox1 is displayed.

• Right-click the sheet name and choose View Code.

In the Visual Basic Editor window:

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

• Press F5.

The value of C13 is linked to the textbox.

Practice Section

Practice here.

## Related Articles

<< Go Back to TextBox | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
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

Advanced Excel Exercises with Solutions PDF