Forum Discussion
Fresh insight to an excel problem
If it is only that, then CTRL + F key, pop-up menu Search and Replace appears. Search for: enter the desired name and if you continue searching, it shows the first area with such an entry ... even if I don't think that's what you're looking for, I'll just send it as an additional thought.
If this is not desired, please give a short feedback.
Glad to help how I am helped.
Nikolino
I know I don't know anything (Socrates)
- aludkaJul 30, 2020Copper Contributor
I'm not looking to find X1. I'm looking to query a certain location and find all the product that's currently logged into that location.
- NikolinoDEJul 31, 2020Platinum Contributor
The only thing I could imagine is to find the last change with VBA date and user and to see who was the last user… ergo the last “x”
Example VBA code:
For example, when the status in cell B3 changes in cell C3, the date of the change should be displayed and in cell D3 the user name that changed B3. Changes to cell B4 should be reflected in C4 and D4, etc.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim z
On Error GoTo Error
If Not Intersect(Range("B:B"), Target) Is Nothing Then
If Target.Row = 1 Then Exit Sub
For Each z In Target
If z.Offset(0, -1) <> "" Then
Application.EnableEvents = False
z.Offset(0, 1) = Format(Date, "DD.MM.YYYY")
z.Offset(0, 2) = Environ("Username")
End If
Next
End If
' Error handling
Err.Clear
Error:
Application.EnableEvents = True
If Err.Number <> 0 Then MsgBox "Error: " & _
Err.Number & vbLf & Err.Description: Err.Clear
End Sub
If it helped, I am very happy ... please mark this as the correct answer so that others are informed. If not, please give a short feedback, maybe the other helpers could help more than me.
Nikolino
I know I don't know anything (Socrates)