The following is the code I am using:
Sub DailySchedUpdate()
Dim z As Long, e As Long
z = Cells(Rows.Count, 2).End(xlUp).Row
ActiveWindow.SmallScroll Down:=-12
For e = 6 To z
If Cells(e, 1) > 0 Then
Cells(1, 6) = "=VLOOKUP(d" & e & ",'L:\Transfer\Fabrication Department\Data Base\[Fabrication Part Breakdown.xls]Router Breakdown'!$A$2:$G$10000,1,false)"
Cells(e, 6) = Cells(1, 6)
Else
Cells(e, 6) = ""
End If
Next e
Code is working but I need all Cells that yield #N/A cleared. I can't just include "" within the formula due to it crashing another formula. What code can I add to clear the contents of every cell that yields #N/A after running?
Sub DailySchedUpdate()
Dim z As Long, e As Long
z = Cells(Rows.Count, 2).End(xlUp).Row
ActiveWindow.SmallScroll Down:=-12
For e = 6 To z
If Cells(e, 1) > 0 Then
Cells(1, 6) = "=VLOOKUP(d" & e & ",'L:\Transfer\Fabrication Department\Data Base\[Fabrication Part Breakdown.xls]Router Breakdown'!$A$2:$G$10000,1,false)"
Cells(e, 6) = Cells(1, 6)
Else
Cells(e, 6) = ""
End If
Next e
Code is working but I need all Cells that yield #N/A cleared. I can't just include "" within the formula due to it crashing another formula. What code can I add to clear the contents of every cell that yields #N/A after running?