View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Grab a key and use it to query another worksheet

Turn on the macro recorder, select the address sheet and the Store Number
column. Do Edit=Find and enter the store number as the target. Click OK.
Turn off the macro recorder.

This will give you the code you need to find the store ID on the address
worksheet. Generalize the "What" argument to accept the store ID as a
variable value.

--
Regards,
Tom Ogilvy

"Don N." wrote in message
...
I use a workbook with several worksheets. This workbook is
used by many diferent departments so I cannot modify it.
The first worksheet (Summary)is populated with information
such as store number, store opening date, store owner,
etc. There is another worksheet (Addresses) that has all
of the address information. Thanks to Chip Pearson, I have
the code that will query the Summary worksheet and give me
a list of all stores opening between two dates. Now I need
to query the Addresses worksheet in order to get the
address information. There is a common "key" (store
number) in all of the worksheets. Is there a way I can
grab this "key" and use it to query the address worksheet
so I can grab the address information?

Any and all help is greatly appreciated