How to Create Floating Text Box in Excel (2 Easy Ways)

While working in Excel, we often need to create a floating text box. A floating text box allows us to display the contents of a cell anywhere in an Excel worksheet. It also provides us with flexibility in positioning the text box. In this article, we will learn two simple methods to create a floating text box in Excel. So, let’s start this article and explore these methods.


How to Create Floating Text Box in Excel: 2 Easy Ways

In this section, we’ll go over two quick ways to make a floating text box in Excel. Let’s say, we have the Prices of Products of ABC Store as our dataset. Our goal is to create floating text boxes using this dataset.

excel floating text box

Not to mention, we used the Microsoft Excel 365 version for this article; however, you can use any version according to your preference.


1. Using Text Box Command from Insert Tab

Using the Text Box command in Excel is one of the easiest ways to create a floating box in Excel. The floating text boxes made by this method have dynamic properties. That is, if you change any data in the original dataset, the values in the text boxes will automatically update. Now, let’s follow the steps mentioned below to do this.

Steps:

  • Firstly, go to the Insert tab from Ribbon.
  • Then, choose the Text Box option from the Text group.

Using Text Box Command from Insert Tab to create a floating text box in Excel

  • Following that, click on the newly created text box.
  • Then, go to the formula bar and type equal (=).
  • Then, click on the cell that you want to show in the text box. In this case, we used cell B2.

Your final formula will be like this.

=$B$2
  • Now, press ENTER.

As a result, the content of cell B2 will be shown in the text box as shown in the following image.

  • Subsequently, follow the same process and create another text box.
  • Then, click on the text box and insert the following formula in the formula bar.
=$B$4

Here, cell B4 indicates the heading of the Product column.

  • Then, hit ENTER.

Using formula to create a floating text box in Excel

Subsequently, the contents of cell B4 will be visible in the second text box.

You don’t need to create text boxes in this way every time. You can simply copy a text box and then paste it. Then, you can edit the text boxes.

  • Firstly, select the text box you want to copy.
  • Then, use the keyboard shortcut CTRL + C to copy the text box.
  • After that, press CTRL + V to paste it.
  • Now, resize the new text box and reposition it according to your needs.

Using Copy and Paste command to create a floating text box in Excel

  • After you have placed the new text box in its position, click on the text box.
  • Then, apply the following formula in the formula bar.
=$C$4

Here, cell C4 refers to the heading of the Product column.

  • Then, press ENTER.

Consequently, you will have the following output inside the new text box.

  • Follow the same procedure for the rest of the cells to get the following output.

Now, we will group them together so that all of these text boxes can float together.

  • Firstly, click on any text box and then press CTRL + A to select them all.
  • After that, go to the Shape Format tab from Ribbon.
  • Then, click on the Group option from the Arrange group.
  • Finally, click on the Group option from the drop-down.

Consequently, you will have a set of floating text boxes, as demonstrated in the following picture. You can drag these text boxes anywhere in your worksheet.

Final output of method 1 to create a floating text box in Excel

Read More: How to Add a Dynamic Text Box in Excel


2. Utilizing VBA Macro Feature

Utilizing the VBA Macro is another smart option to create floating boxes in Excel. Let’s follow the steps outlined in the following section to do this.

Steps:

  • Firstly, go to the Developer tab from Ribbon.
  • After that, choose the Visual Basic option from the Code group.

Utilizing VBA Macro Feature to create a floating text box in Excel

As a result, the Microsoft Visual Basic window will open on your worksheet.

  • Now, in the Visual Basic window, go to the Insert tab.
  • Then, choose the UserForm option from the drop-down.

As a result, the following UserForm window will be available along with a Toolbox, as shown in the image below.

  • Now, click on the Text Box icon inside the Toolbox, as marked in the following picture.
  • Then, drag it inside the UserForm1 window.

Editing UserForm window to create a floating text box in Excel

  • Next, resize the text box so that it matches the edges of the UserForm1 window.

  • Now, click on anywhere inside the text box.
  • After that, search for the Multiline option in the Properties – TextBox1 section on the left side of your screen.
  • Then, click on the drop-down icon beside the Multiline option and choose the True option.

Note: If you can’t find the Properties section, go to the View tab in the Visual Basic window and select the Properties Window option. 

  • Afterward, go to the Insert tab and choose the Module option from the drop-down.

Creating new Module to create a floating text box in Excel

  • After that, write the following code in the newly created Module.
Sub floating_text_box()
UserForm1.TextBox1.Text = "Product Brand Price" & vbLf & "Laptop Acer $1,500"
UserForm1.Show vbModeless
End Sub

Code Breakdown

  • Firstly, we initiated a sub-procedure named floating_text_box.
  • After that, we specified what should be displayed inside the text box.
  • Here, we used the vbLf character to go to the next line. You can add more vbLf characters to add more lines.
  • Finally, we ended the sub-procedure.
  • After writing the code, click on the Save option.

  • Now, press the keyboard shortcut ALT + F11 to redirect to the worksheet.
  • Subsequently, use another keyboard shortcut ALT + F8 to open the Macro dialogue box.
  • Following that, in the Macro dialogue box, choose the floating_text_box option.
  • Finally, click on Run.

As a result, the following floating text box will pop up on your worksheet, as shown in the following image.

Final output of method 2 to create a floating text box in Excel

Read More: How to Insert Scrolling Text Box in Excel


How to Create a Floating Table in Excel

In this section of the article, we will learn how we can create a floating table in Excel. So, let’s follow the procedure outlined in the following section to do this.

Steps:

  • Firstly, select the entire table and go to the Home tab from Ribbon.
  • Then, click on the Copy option from the Clipboard group.
  • Now, choose the Copy as Picture option from the drop-down.

How to Create Floating Table in Excel

  • After that, choose the As shown on screen option in the Appearance field.
  • Then, from the Format field, select the Picture option.
  • Next, click OK.

  • Now, select the destination cell where you want to paste the floating table.
  • Lastly, press the keyboard shortcut CTRL + V.

Consequently, you will have a floating table on your worksheet, as demonstrated in the image given below.

Final output of method 3 to Create Floating Table in Excel

Read More: How to Anchor Text Box in Excel


How to Create Floating Cells in Excel

The procedure to create floating cells is almost similar to creating a floating table. So, without any further delay, let’s explore the following steps.

Steps:

  • Firstly, select a cell from your dataset and go to the Home tab from Ribbon.
  • After that, choose the Copy option from the Clipboard group.
  • Then, select the Copy as Picture option from the drop-down.

How to Create Floating Cells in Excel

  • Following that, choose the As shown on screen option in the Appearance field.
  • Now, from the Format field, select the Picture option.
  • Afterward, click OK.

  • Subsequently, select your destination cell and then press the keyboard shortcut CTRL + V to paste the copied cell as a picture.

That’s it! You will have your selected cell as a floating cell on your worksheet, as shown in the following picture.

  • You can use the same steps and create as many floating cells as you want.

Final output of method 4 to Create Floating Cells in Excel


Download Practice Workbook


Conclusion

So, these are the most common and effective methods you can use anytime while working with your Excel datasheet to create a floating text box in Excel. If you have any questions, suggestions, or feedback related to this article, you can comment below.


Related Articles


<< Go Back to TextBox | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Zahid Hasan
Zahid Hasan

Zahid Hassan, BSc, Industrial and Production Engineering, Bangladesh University of Engineering and Technology, has worked with Exceldmy for 1.5 years. He has written 95+ articles for Exceldemy. He has worked as an Excel & VBA Content Developer. He also worked as a VBA Developer for the Template team. Currently, he is working as a Junior Software Developer for the Excel Add-in project. He is interested in Software Development, Python, VBA, VB.NET, and Data Science, expanding his expertise in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo