Proper syntax for this

B

Barb Reinhardt

I want to functionally define a constant using this equation. Target is the
target for a worksheet change event and it's one cell in this instance.
Statics!Query_from_MS_Access_Database is a named range. You get the
picture. What do I need to change?

CompanyID = VLookup(Target, Statics!Query_from_MS_Access_Database,
2, False)

Thanks,
Barb Reinhardt
 
B

Bob Phillips

On Error Resume Next
CompanyID = Application.VLookup(Target,
Statics!Query_from_MS_Access_Database, 2, False)
On Error Goto 0
If Not Iserror(CompanyId) then


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top