Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to insert floating table or textbox in Excel worksheet?

Author Xiaoyang Last modified

In practical Excel work, there are often situations where you need certain important content—such as a table summary, notification, calculation outcome, or critical note—to remain visible at all times, even when scrolling through lengthy sheets. Typically, tables or textboxes anchored in cells will scroll out of sight as you move around a large worksheet. This can reduce efficiency and cause missed updates or essential reference data to be overlooked. To address this, users often ask: is it possible to make a table or textbox "float" so that it stays put regardless of scrolling position?

This article introduces several practical techniques to achieve the effect of a floating or always-visible table or textbox in Excel, including VBA approaches and built-in Excel features. Each solution has its particular scenarios and features for you to select from based on actual needs. In addition, common pros and cons of each method are noted so you can choose the best fit for your workflow.

Table of Contents

Insert floating table in Excel with VBA code

Insert floating textbox in Excel with VBA code

Other Built-in Excel Methods - Freeze Panes

Other Built-in Excel Methods - Place Textbox or Shape in an Unscrolled Location


Insert floating table in Excel with VBA code

Excel does not provide a direct built-in function to insert a truly floating table that remains visible over all other worksheet content while scrolling. However, you can work around this by converting your table into an image and using VBA to dynamically reposition that image to always display in a fixed area, such as the top right corner of the screen.

This solution is useful when you have a summary table or frequently referenced data block that must remain readily accessible on busy or long worksheets. However, be aware that the table becomes a static image—cell-level editing and formulas will not update the picture, so you'll need to refresh it if the source data changes.

1. Select the data table that you want to keep visible, then go to the Home tab, click Copy and select Copy as Picture. This can usually be found under the dropdown arrow below the standard Copy function. See screenshot:

a screenshot of selecting the Copy as Picture after selecting a data table

2. In the "Copy Picture" dialog box that appears, set Appearance to As shown on screen and Format to Picture. Click OK. Next, click a blank cell where you wish to paste the picture, then use Ctrl + V to paste it. At this stage, you can move and resize the picture as needed. See screenshot:

a screenshot of pasting the selected data table as a picture

3. Once the table has been converted into a picture, right-click the tab at the bottom of the sheet containing the picture, and choose View Code. In the opened Microsoft Visual Basic for Applications (VBA) window, insert the following code into the relevant worksheet code window:

VBA code: Insert floating table in Excel

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updateby Extendoffice
    Application.ScreenUpdating = False
    If Target.Cells.Count > 1 Then Exit Sub
        With ActiveSheet.Shapes("Picture1")
            .Top = ActiveWindow.VisibleRange.Top + 5
            .Left = ActiveWindow.VisibleRange.Left + ActiveWindow.VisibleRange.Width - .Width - 45
        End With
    Application.ScreenUpdating = False
End Sub

Note: The Picture1 in this code refers to the name of the pasted image. You can find it by selecting the image and looking at the Name Box on the top left of Excel, or by right-clicking the picture and selecting "Size and Properties". Modify the code to match your actual picture object name.

a screenshot showing how to use the VBA code

4. Save and close the VBA code window. Now, whenever you scroll the worksheet or click any cell, the table picture will remain positioned at the top right corner of the visible worksheet area.

This approach is ideal for creating always-visible summary data snapshots, but remember that as a picture, it will not automatically update with changed cell values. If the underlying data changes, you will need to repeat the process to refresh the floating image.

Common issues you might encounter include the floating picture obscuring other content, or not showing if the worksheet objects are set to be invisible. Always check your worksheet's object visibility settings and adjust the size and location of your picture for optimal viewing.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Insert floating textbox in Excel with VBA code

When the requirement is to display notes, reminders, or formula results prominently, a floating textbox can be an effective choice. While Excel does not have a native "floating" textbox, you can use VBA to make an ActiveX textbox follow the visible window, staying in a consistent position as you scroll through your worksheet.

This option is particularly suitable for adding persistent comments, instructions, or warnings to shared documents, making sure every user sees the important information regardless of where they navigate.

1. Insert a textbox by clicking Developer > Insert > Text Box (ActiveX Control). Then draw the textbox onto your worksheet and type your desired text into it. If the Developer tab is not visible, you may need to enable it from Excel Options first. See screenshot:

a screenshot of the inserted textbox activex control and values inside it

2. Next, right-click on the sheet tab containing the inserted textbox and select View Code. In the VBA window, paste the following code into the sheet's code area:

VBA code: Insert floating textbox in Excel

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updateby Extendoffice
    Application.ScreenUpdating = False
    With ActiveWindow.VisibleRange
        TextBox1.Top = .Top + 5
        TextBox1.Left = .Left + .Width - TextBox1.Width - 45
    End With
    Application.ScreenUpdating = True
End Sub

Note: In this code, TextBox1 is the default name of the ActiveX textbox you created. To ensure the code works, check the textbox's name and adjust if necessary by selecting it and viewing or editing in the Name Box.

a screenshot of using the VBA code

3. Save and close the VBA editor. Whenever you scroll to a different area of the worksheet, the textbox will automatically stay anchored at the top right corner of the visible window, ensuring that your critical text is always viewable.

This approach is ideal when you need dynamic, always-visible notes or instructions, without locking down cell ranges. Note, however, that some users may experience compatibility issues with ActiveX controls, especially in non-Windows environments. Also, saving as certain older file formats (.xls) may strip out the ActiveX elements.

If you notice that the textbox is not moving with the scroll, double-check that the VBA code is running (macros must be enabled), and confirm that the control's name matches the code.


Other Built-in Excel Methods - Freeze Panes

When you simply want to keep certain rows or columns, such as headers or summary tables, visible as you scroll through a worksheet, Excel’s Freeze Panes feature provides a straightforward solution—no VBA required.

This approach is well suited for worksheets where your important reference data is positioned at the top (such as a title row or summary table) or left side (like row labels), and you don't want them to disappear during navigation. This solution is especially helpful for financial reports, data entry sheets, or forms that require constant column or row awareness.

How to use:
Place the cursor below the last row or to the right of the last column you want to keep visible. For example, if your table is in the first 3 rows, place your cursor in row 4. Then go to View > Freeze Panes > Freeze Panes. Excel will freeze all rows above and columns to the left of your selection.

Like all built-in tools, this method is quick and reliable, and does not require code or special permissions. However, unlike true floating objects, freeze panes only keep specified rows/columns fixed—they do not hover over the worksheet, and you are limited to one "freeze" boundary per worksheet.

Potential issues may arise if your worksheet already uses split windows or if you want more flexible floating placement. If you unfreeze the panes, the effect is removed, and you may need to reapply it if the range changes after edits to your sheet layout.


Other Built-in Excel Methods - Place Textbox or Shape in an Unscrolled Location

Another workaround is to insert a Textbox or Shape using Insert > Text Box or Insert > Shapes, and place it within a row or column that is already frozen—making it always visible when scrolling the worksheet vertically or horizontally. This method lets you add a fixed label, note, or highlighted area within the "frozen" sections, so that your important information remains in view.

This solution is best when your always-visible content is small and can fit conveniently in a header or left margin, such as audit comments, sheet status marks, or brief instructions. The main advantage is its simplicity and compatibility—no code, no security warnings, just native Excel features.

However, please note this is only a partial workaround: the textbox or shape is anchored to the cells, so it "floats" only within the unfrozen area. It does not move dynamically as you scroll elsewhere in the sheet, and if users change the frozen area or delete relevant rows/columns, the textbox might shift or vanish from the visible area. To ensure the best results, align your textbox precisely within the frozen space, and remind users not to alter frozen ranges by accident.

If you need more flexible positioning—for example, for objects that hover above any cell at any scroll position—then using VBA, as described in the earlier sections, is a more appropriate choice.


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in