Hirdetés

Új hozzászólás Aktív témák

  • lcdtv

    tag

    Sziasztok!
    Milyen megoldás van arra, hogy több ezer soros adatból, pl vonalkód olvasóval beírt adat után megkeresse az egyezőket ugorjon is oda arra a sorra és emelje is ki színnel. Találtam egy vba kódot de az csak megmutatja a sor sorszámát.Sub hanyadiksorbanvan()
    Dim Prompt As String
    Dim RetValue As String
    Dim Rng As Range
    Dim RowCrnt As Long

    Prompt = ""

    With Sheets("Munka1")
    Do While True

    RetValue = InputBox(Prompt & "Give me a value to look for")
    'RetValue will be empty if you click cancel
    If RetValue = "" Then
    Exit Do
    End If

    Set Rng = .Columns("A:A").Find(What:=RetValue, After:=.Range("A1"), _
    LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)

    If Rng Is Nothing Then
    Prompt = "I could not find """ & RetValue & """"
    Else
    RowCrnt = Rng.Row
    Prompt = "I found """ & RetValue & """ on row " & RowCrnt
    End If
    Prompt = Prompt & vbLf
    Loop

    End With

    End Sub

Új hozzászólás Aktív témák