Hello everyone,
I've managed to acquire and modify a simple macro to find and place a text in adjacent cells. The thing i could really use is some additional functions to it. What i need is to firmly verify that the data was entered where it should be and as it should be. To put it simply. The data is entered-->It is found and timestamped in another worksheet-->Active sheet switches to where the data was placed. If anyone has better ideas or a macro update, i thank you will all my heart.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Dim lCol As Long
Dim ws As Worksheet
Dim bFound As Boolean
On Error GoTo Terminate
If Target.Value = "" Then GoTo Terminate
Select Case Target.Address(0, 0)
Case "C7"
lCol = 11
Case "F7"
lCol = 16
Case Else
lCol = 0
End Select
If Not lCol = 0 Then
Application.EnableEvents = False
For Each ws In ThisWorkbook.Worksheets
Set c = ws.Range("T:T").Find(What:=Target.Value)
If Not c Is Nothing Then
bFound = True
ws.Cells(c.Row, lCol).Value = Date
ws.Cells(c.Row, lCol + 1).Value = Range("E4").Value
ws.Cells(c.Row, lCol + 2).Value = Range("E5").Value
End If
Next ws
If bFound = False Then
MsgBox Target.Value & " not found", vbExclamation + vbOKOnly
Target.Select
Else
Target.ClearContents
End If
End If
Terminate:
Application.EnableEvents = True
End Sub
Bookmarks