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.

excel text box linked to cell

 

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

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

excel text box linked to a single cell

Step 1:

Insert a text box.

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

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

excel text box linked to a single cell

  • Press ENTER.

You will see the total sales value in the textbox.

  • After formatting, this is the output.

excel text box linked to a single cell


Example 2 – Linking Multiple Cells to a Text Box

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

excel text box linked to multiple cells

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.

formula

  • Select the textbox and enter 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

Use the TEXT function with the ampersand operator.

Formatting Values of a Linked Cell in an Excel Text Box

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.

formula

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

textbox

  • 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.

Formatting Values of a Linked Cell in an Excel Text Box


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.

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

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.

formula

  • 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

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

  • 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.

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 the ActiveX Control Text Box to Link a Cell in Excel

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

Utilizing ActiveX Control Text Box to Link a Cell in Excel

Steps:

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

textbox

  • Drag the plus icon down and to the right.

TextBox1 is displayed.

textbox1

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

view code

In the Visual Basic Editor window:

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

code

  • Press F5.

The value of C13 is linked to the textbox.

Utilizing ActiveX Control Text Box to Link a Cell in Excel


Practice Section

Practice here.

practice


Download Practice Workbook


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