View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jason Jason is offline
external usenet poster
 
Posts: 367
Default Function to Query CSV file

Thanks JMay

I am have simplified my example a little too much. There will be some
additional logic built into the SQL that would prevent using vlookup. Also
the csv file will eventually be loaded to an Access database, also preventing
the use of vlookup.

I am basically just trying to learn how to establish the connection to the
csv file and return a value based on parameters passed.

Appreciate your response.

Jason

"JMay" wrote:

Check out the basic VLOOKUP() Function in Help -- It will do this for you.

"Jason" wrote:

I have a simple csv file with two fields (employee number, employee name).

I would like to build a custom function (something like GetEmployeeName), so
that when the user enters =GetEmployeeName('12345'), it will query the csv
file, look for employee number 12345 and return that employee's name.

I have very basic VBA and SQL skills. Basically enough to know this is
possible, but not enough to make it happen.

Has anyone written anything like this in the past?

Appreciate any help.

Thanks

Jason