Thread: [Solved] VLookup Syntax
View Single Post
 
Old 04-08-2014, 08:00 AM
ketbdnetbp ketbdnetbp is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Apr 2014
Location: Chicago
Posts: 1
ketbdnetbp is on a distinguished road
Default VLookup Syntax

The following code is part of a loop but, it is not working. I believe its a syntax problem, any suggestions...
If Worksheets(iDSK2).Cells(intRow, 5).Text = "Associate" Then
Worksheets(iDSK2).Cells(intRow, 24).Select
ActiveCell.Formula = "=VLOOKUP(CONCATENATE(A" & intRow & ", "" "", B" & intRow & "),Sales!$A$6:$J200,4,FALSE)"
Else
Worksheets(iDSK2).Cells(intRow, 24).Select
ActiveCell.Value = "0.00"
End If
Dim valCheck As String
valCheck = Worksheets(iDSK2).Cells(intRow, 24).Text
If valCheck = "#N/A" Then
Worksheets(iDSK2).Cells(intRow, 24).Value = 0
End If
Reply With Quote