Creating a macro on employee data

cathy2007

New Member
Joined
Sep 14, 2007
Messages
24
Hi, looking to set up a simple macro, but it's been a minute since I've done this. Can you help me get there faster?

My table in excel has 3 columns:

column 1: employee name (Joe, Martha, Sue, Yue...)
column 2: job stream (Operations, Finance, IT,...)
column 3: role level (1, 2, 3...)

I want to query the data based on what I enter into 2 fields (job stream & role level). For example..."give me all employee names" where job stream = Operations AND role level is >= 3. I need to do multiple queries, so I need to be able to key in the job stream and role level multiple times to pull the unique names.

I've been able to set up something 'okay' using IF((AND statements, but it's not ideal because I'm left with alot of blank cells. I'm hoping that a macro gives me something cleaner without alot of fixing up after the query.

Thank-you!!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If you are running Excel 2010 or later, this can be set up with parameter queries in Power Query/Get and Transform. What version are you running? Will you upload some sample data to work with so that this may be demonstrated to you. Use XL2BB to upload some sample data. Also, if you would update your profile to indicate which version of Excel you are running. Some features in newer version are not available in older versions. It is helpful to know which.
 
Upvote 0

Forum statistics

Threads
1,215,038
Messages
6,122,798
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top