logo
search
Office Settings & Configuration

How to Keep the Excel Find Dialog in the Same Position

Maira MehtabMaira Mehtab Sep 28, 2026 869 views

Question details

The user wants to lock or manually control the on-screen position of the Find dialog box in Excel so it does not open in varying locations.

Product
Microsoft Excel
Device & OS
Windows 11
Scenario
Searching for data across multiple Excel workbooks where the Find dialog box repeatedly shifts position.
Observed behavior
The Find dialog box opens in different screen locations for different workbooks instead of staying in a fixed position.
Before you start

Before proceeding, ensure you have enabled the Developer tab in your Excel ribbon and that you save your file as a Macro-Enabled Workbook (.xlsm) to allow the necessary VBA scripts to run.

Solution 1Recommended

Use a VBA Macro with Windows API Functions

Since Excel lacks a built-in feature to lock the dialog position, you must use a VBA macro calling Windows API functions to force the window to specific coordinates.

Microsoft Excel does not natively remember or lock the exact screen coordinates of the Find dialog. To achieve a fixed position, advanced VBA coding is required to call the Windows FindWindowA and SetWindowPos functions, which locate the dialog box and force it into your preferred position.

1
Open the VBA Editor

Press Alt + F11 on your keyboard while in Excel to launch the Microsoft Visual Basic for Applications editor.

2
Insert a New Module

Click on 'Insert' in the top menu bar, then select 'Module' to create a blank coding space.

3
Declare the Windows API Functions

At the top of the module, declare the FindWindowA and SetWindowPos functions. These are required to interface with the Windows operating system window manager.

4
Create the Positioning Macro

Write a subroutine that first opens the Find dialog using standard Excel VBA commands, then uses FindWindowA to locate the 'Find and Replace' window, and finally applies SetWindowPos to move it to your desired X and Y screen coordinates.

5
Run the Macro

Assign this new macro to a custom keyboard shortcut or a button in your Quick Access Toolbar. You must run this macro every time you open the Find dialog to force it into the designated position.

VBA and API Complexity: Using Windows API functions requires advanced programming knowledge. If the dialog fails to move, ensure your Windows API declarations are correct for your version of Office (32-bit vs 64-bit PtrSafe).
Free Microsoft Office alternative

Switch to WPS Office for a Smoother Spreadsheet Experience

If managing complex VBA macros and Windows API functions to fix basic interface issues is too frustrating, consider switching to WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Excel with an intuitive, reliable interface out of the box.

  1. 1. Download the Installer: Visit the official WPS website and download the free installation package for your PC.
  2. 2. Install WPS Office: Run the downloaded executable file and follow the simple on-screen instructions to complete the installation.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel workbooks to enjoy a streamlined workflow.
Fully compatible with Microsoft Excel formats, including .xlsx, .xls, and .csv.Free to download and lightweight, ensuring fast loading and smooth system performance.Familiar user interface makes migration from Microsoft Office intuitive and seamless.Robust built-in search features without the need for complex API coding.
microsoft office alternative - wps office

Frequently Asked Questions

Can I lock the Find dialog position without using VBA?

No, Excel does not offer any built-in settings or toggles to lock the Find and Replace dialog to a specific area on your screen.

Why does the Excel Find dialog jump around the screen?

Excel attempts to remember the last position the dialog was placed in during your active session. However, opening different workbooks, changing zoom levels, or connecting multiple monitors can cause the coordinates to reset.

Will this VBA method work on Mac computers?

No, the FindWindowA and SetWindowPos functions are specific to the Microsoft Windows operating system architecture and cannot be used in Excel for Mac.