Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
CosminaCSM
Femeie
23 ani
Bucuresti
cauta Barbat
23 - 39 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Highlight Row If Value in A1 is in Column B Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2186
Add this to your Sheet's code:


Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long
    LastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row

If Target.Address = "$A$1" Then
    If Target <> "" Then
    With Range("B1:B" & LastRow)
        Set bc = .Find(Target, lookat:=xlWhole)
            If Not bc Is Nothing Then
                Range(Cells(bc.Row, 2), Cells(bc.Row, 5)).Interior.ColorIndex = 6
                Cells(bc.Row, 6) = "Present"
                Cells(bc.Row, 7) = Now
            Else: MsgBox "Barcode Not Found"
            End If
    End With
    End If
End If
End Sub


This will highlight rows B-E, insert Present in row F and date and time in column G if value in A1 is found in column B.

Source:

Credits: DerbyDad03


_______________________________________


pus acum 5 ani
   
Pagini: 1  

Mergi la