Find The Matching Cells
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.
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
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.