How do you create a Macro to return text from multiple cells that fit your criteria?

  • Thread starter Thread starter bdolney
  • Start date Start date
B

bdolney

Does anyone know how you create a Macro to return text from multiple
cells that fit your criteria? Let's say you have a worksheet with 100
records of people's names and various information about them (job,
age, salary, etc.). You want to create a Macro that will return the
names of everyone who fit a set of criteria you specify, i.e. Lawyers,
or Doctors AND over 50 years old, etc. Does anyone know how to do
this? Thanks.
 
If the XL file is closed or in a database, using ADO/SQL or Data>Import
External Data>New Database query, would be the simplest route.

Otherwise, look into Data>Advanced Filter and record a macro whilst you
perform the actions.

NickHK
 

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

Back
Top