VBA N/A error

Joined
Jul 31, 2007
Messages
2
Reaction score
0
I'm trying to create an automatic script that checks cost codes against a networked list. It works fine if there are codes that are not matched. ie if the Vlookup can return a result then commences the loop of filldown then check again.

Code:
 [C5].Formula = "=VLOOKUP(RC[-2],'\\Groupserver\GROUP\Group IT\Company Word Templates\CostCodes\[Costcode Table.xls]Costcodes'!R8C2:R500C3,2,FALSE)"
[b]If IFNA(C5) Then Exit Sub[/b]
If IsEmpty(ActiveCell) Then Exit Sub

 'fill down column "M"
Range(ActiveCell, ActiveCell.Offset(0, -2).End(xlDown).Offset(0, 2)).FillDown
	'Selection.AutoFill Destination:=Range("C1:C121"), Type:=xlFillDefault
   ' Range("C1:C121").Select
	Range("D2").Select

That what i've been trying unsuccessfully to work, any ideas on how i can get this to work ? :)

thanks

Dave
 
Back
Top