vbacoder12
New Member
- Joined
- Sep 4, 2024
- Messages
- 41
- Office Version
- 2024
- Prefer Not To Say
- Platform
- Windows
Hi,
I am placing this code into vba hopefully when I try to run i am getting run time error 1004. Application defined or object defined error.
Sub insert formula and drag
Dim last row as long
Lastrow=Range("K" & Rows.Count).End(xlUp).Row
Range("k7").formula="=IfNa(vlookup(j7,Codes!A:B,2,False),"")"
Range("k7").auto fill destination:=Range("K7:K" & Lastrow)
End Sub
I am placing this code into vba hopefully when I try to run i am getting run time error 1004. Application defined or object defined error.
Sub insert formula and drag
Dim last row as long
Lastrow=Range("K" & Rows.Count).End(xlUp).Row
Range("k7").formula="=IfNa(vlookup(j7,Codes!A:B,2,False),"")"
Range("k7").auto fill destination:=Range("K7:K" & Lastrow)
End Sub