Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,231
- Office Version
- 2010
- Platform
- Windows
Hi All happy Friday, I hope you can help me please - i have a snippet of code below where the Range is A2 to last row and under 'Email Links row V to find the matching name. This works great, but i would like to add a message box that if the name is not found in A2 to last row then a message box will pop up stating 'Jo Bloggs' not found! - for example, then asks a yes or no if i want to continue and it will skip that name not found. Can you help please and i hope this makes sense.
VBA Code:
Dim Cl As Range
For Each Cl In Range("A2", Range("A" & Rows.Count).End(xlUp))
Cl.Value = Trim(Cl.Value)
Next Cl
Dim lr As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
With Range("I2:I" & lr)
.Formula = "=XLOOKUP(A2,'Email Links'!A:A,'Email Links'!V:V)"
.Value = .Value
End With