Leorand
New Member
- Joined
- Nov 25, 2022
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
Hello Guys, I got some question about the tittle above.
I want to make VBA program to match data using IFERROR(VLOOKUP) formulas, and the code like this :
In this code I use Target.Row function to make whenever the D row has data, E row will show the match data using Vlookup formulas.
For the first Input in row D4, row E4 showing the match data, but when it goes to row D5 with different data, row E5 still showing the same data as row E4.
Like this :
So how do I solve this case? Is there are another method?
I need your help guys.
It will help me a lot.
Best Regards
I want to make VBA program to match data using IFERROR(VLOOKUP) formulas, and the code like this :
VBA Code:
Set TableRange = Range("D4:D10000")
result = Application.IfError(Application.VLookup(TableRange, Sheet5.Range("A2:C170"), 3, False), "")
If Range("E" & Target.Row).Value = "" Then
Range("E" & Target.Row).Value = result
End If
In this code I use Target.Row function to make whenever the D row has data, E row will show the match data using Vlookup formulas.
For the first Input in row D4, row E4 showing the match data, but when it goes to row D5 with different data, row E5 still showing the same data as row E4.
Like this :
So how do I solve this case? Is there are another method?
I need your help guys.
It will help me a lot.
Best Regards