Search Data Within Entire Workbook With Userform

excel  pairing spin button with textbox Find The Matching Cells
With Userform

The easy and fast way to search for matching cells in the workbook.

In any sheet of the workbook , when the cell content that to be searched is double-clicked , a userform opens instantly and the addresses of cells matching wıth the clicked cell are specified as worksheet and cell address in the listbox on userform. When worksheet and cell address is clicked on the listbox ,that cell and worksheet becomes active.

The quantity of matching – found values are shown on the label at bottom of the listbox.

excel userform opens when cell is double clicked

We have added a code snippet to the Workbook_SheetBeforeDoubleClick procedure to display the userform when the active cell is double clicked on all sheets of the workbook :
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Target <> "" Then
Cancel = True
Search_cell_value.Show 0
End If
End Sub

excel search duplicate cells You can adapt this template to your own Excel workbook. For this, follow the instructions below :
1️⃣ Open your workbook.
2️⃣ Press Alt+F11 keys and open VBE(Visual Basic Editor) Window
3️⃣ In left side of VBE window, drag – drop the Search_cell_value userform in the template to your workbook.
4️⃣ Copy VBA code from the ThisWorkBook (Workbook_SheetBeforeDoubleClick procedure above) field and paste it into this section of your workbook.

📥 Download Excel workbook