How to advance search

rehanemis

Board Regular
Joined
Aug 15, 2016
Messages
50
Hi,

I am using excel sheet contains about 15 columns with records. I have created advance filter using this youtube tutorial
Code:
https://www.youtube.com/watch?v=0f_jlbJBB5Q

Actually I want that I can type keyword/content in single search and it search all the records and show the rows where keyword is found.

Is it possible?

how can I can share my excel book?

Waiting of your kind reply.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try this macro. It will highlight all rows containing your search term.
Code:
Sub searchVal()
    Application.ScreenUpdating = False
    Dim foundVal As Range
    Dim sAddr As String
    Dim response As String
    response = InputBox("Please enter the value to search.")
    With ActiveSheet.UsedRange
        Set foundVal = .Find(response, LookIn:=xlValues, lookat:=xlWhole)
        If Not foundVal Is Nothing Then
            sAddr = foundVal.Address
            Do
                foundVal.EntireRow.Interior.ColorIndex = 3
                Set foundVal = .FindNext(foundVal)
            Loop While foundVal.Address <> sAddr
            sAddr = ""
        Else
            MsgBox ("Value not found.  Please try again.")
        End If
    End With
    Set foundVal = Nothing
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,704
Members
449,118
Latest member
MichealRed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top