View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ckramer7070@gmail.com is offline
external usenet poster
 
Posts: 22
Default Using VLOOKUP in VBA

Just need a quick clarification; I am trying to find a value (Job
Number) in the same row as the DueDate variable shown in the procedure
below. I can't get it to work, I was assuming it would find the
closest date if there were no matches. Is this correct?

dim rngdate as range
dim WS as worksheet

rngDate = WS.Application.WorksheetFunction.VLookup(DueDate, "G1:G500",
5, True)

I would like to search through column G for the DueDate, and return
the corresponding Job Number in column 5.

Thanks for any help,

Chad