How to use VBAs Find Function

< Back to Search results

 Category: [Excel]  Demo Available 

How to use VBAs Find Function



To pull out some records using and display them in the corresponding text boxes.



Private Sub serial_AfterUpdate()
    With Me
        If WorksheetFunction.CountIf(Sheet2.Range("B:B"), .serial.Value) = 0 Then
            MsgBox "Value Not Found in Purchase Records"
            Exit Sub
        End If
        .serial = ""
        .bra = Sheet2.Range("list").Find(.serial, LookIn, LookIn:=xlValues, lookat:=xlWhole)
    End With


Obtained from the OzGrid Help Forum.

Solution provided by royUK.


See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets


See also:

How to use a Macro to copy rows from multiple worksheets based on a cell value greater than zero
How to copy last used row to next empty row in another worksheet

How to copy and paste when criteria is met

How to copy information from an excel sheet to a word document
How to copy cell value on Sheet 1 to a location in a text in another cell on Sheet 2


Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


stars (0 Reviews)