MrExcel Publishing
Your One Stop for Excel Tips & Solutions


Posted by Keith on January 07, 2002 8:34 AM

I would like to enter a name in a cell, and by just entering the name or pushing a button I would like to run a query that would look up the name in an MS Access
database and display the person ID number and phone #. I don't know how to use macro's or use IF statements in querys - Ex. If name in cell A1 is in table Name Write ID to cell b3 and phone to b4.

Posted by Mark W. on January 07, 2002 8:42 AM

This functionality is supported by the
Data | Get External Data... menu command.
Take a look at the Excel Help Topics for...

1. "Create a query that prompts for criteria"
2. "Use data from a cell on a worksheet as a
parameter value"