How do I get the date value and not #NAME? in the following?
Thanks.
These are the different Cvar's that I've tried.
At this point in time, all I want to do is get the date, not #NAME?
Thanks.
Thanks.
Code:
Sub VlookupColBUsingDoLoopWithErrorTrap ()
Application.ScreenUpdating = False
Sheets("Data3BDS").Select 'sheet to receive the date info
'LastRow is for the item# on lookup table DataAllSales
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Offset(1, 0).Row
Sheets(“Data3BDS”).Select
Range(“B1”).Select
Do
With ActiveCell
If IsEmpty(ActiveCell) Then
Err.Number = 0
On Error Resume Next
ActiveCell.Offset(1,0).Select
Else
With Range(ActiveCell.Offset(0, 4).Address)
If Err.Number = 0 Then
.Value = "=VLookup(activecell.address, AllSalesData!$A$2:$E$" & LastRow & ", 2, False)”
End If
ActiveCell.Offset(1, 0).Select
End With
End If
End With
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
Application.ScreenUpdating = True
End Sub
These are the different Cvar's that I've tried.
Code:
.Value = CVar("=VLookup(activecell.address, AllSalesData!$A$2:$E$" & LastRow & ", 2, False)”)
.Value = "=CVar(VLookup(activecell.address, AllSalesData!$A$2:$E$" & LastRow & ", 2, False))”
.Value = CVar("=VLookup(activecell, AllSalesData!$A$2:$E$" & LastRow & ", 2, False)”
.Value = "=CVar(VLookup(activecell, AllSalesData!$A$2:$E$" & LastRow & ", 2, False)”
At this point in time, all I want to do is get the date, not #NAME?
Thanks.