Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4090
- ---------------------------------
- Private Sub TextBox1_AfterUpdate()
- Dim x, v, b As Boolean, r As Long, m As Long
- For r = Cells(Rows.Count, 2).End(xlUp).Row To 2 Step -1
- If TextBox1.Value = Cells(r, 2).Value And Cells(r, 11).Value > 0 Then
- v = Cells(r, 6).Value2
- If v > x Then b = True: x = v: m = r
- End If
- Next r
- If b Then TextBox2.Value = Cells(m, 11).Value Else TextBox2.Value = ""
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement