Maybe...
Option explicit
sub testme()
dim lookupRng as range
dim res as variant
dim col_index_num as long
'include more columns if necessary
set lookuprng = worksheets("VBPA").range("a:Z")
col_index_num = 13 'what should it be?
with worksheets("billable jobs")
if ucase(.range("C3").value) = "JC" then
res = application.vlookup(.range("E3").value, lookuprng,col_index_num,0)
if iserror(res) then
'there was no match
else
msgbox "returned: " & res
end if
end if
end with
end sub
(If I understood your references correctly.)
Jeff wrote:
I need to design a VBA formula for the following:
In worksheet Billable Jobs, I want to do Vlookup of the value of row E3
in table_Array = worksheet VBPA in Col_index_num Column D if and only if
in the column C there the text JC
--
Regards,
Jeff
--
Dave Peterson
|