View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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