How to Keep the Excel Find Dialog in the Same Position
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 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.
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.
Press Alt + F11 on your keyboard while in Excel to launch the Microsoft Visual Basic for Applications editor.
Click on 'Insert' in the top menu bar, then select 'Module' to create a blank coding space.
At the top of the module, declare the FindWindowA and SetWindowPos functions. These are required to interface with the Windows operating system window manager.
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.
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.
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. Download the Installer: Visit the official WPS website and download the free installation package for your PC.
- 2. Install WPS Office: Run the downloaded executable file and follow the simple on-screen instructions to complete the installation.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel workbooks to enjoy a streamlined workflow.

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.




