Avatar of Andrea Bernard
Andrea Bernard
 asked on

Writing a Macro that looks to a value in a cell and returns a list of items that correspond to that value?

Hi there, I'm working on writing a Macro in excel (don't have any VBA experience). I'm hoping to use the value on tab one in C5 and return the list of all items numbers that correspond to C5 (column C in tab 2). Is this possible to do with a macro?

Thank you!!
Andrea
Excel-Help-11.xlsx
VBAMicrosoft ApplicationsMicrosoft OfficeMicrosoft Excel

Avatar of undefined
Last Comment
Alan

8/22/2022 - Mon
Martin Liss

Please describe how you want the macro to work.
Andrea Bernard

ASKER
Sorry for not being clear, was hoping the Marco would return the lists of item numbers into E6 on tab one. Thank you!
SOLUTION
Alan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Andrea Bernard

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Alan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Rob Henson

You can achieve this without VBA or formulas. You can use a Pivot Table.

See attached. This uses the department as a Page Filter and then it shows the list of item numbers for that department.

If you were to change the data list to an excel Table rather than a standard list the Pivot would adjust automatically for the range of data expanding (or shrinking).

Thanks
Rob
Excel-Help-11.xlsx
Your help has saved me hundreds of hours of internet surfing.
fblack61
Rob Henson

Thanks for the points. Oh wait, everybody but me received them.
Alan

Hi Rob,

I have a the remains of a pie here, you're welcome to have.... here, catch!

Oops, sorry.  I'm sure it will come out.

Alan.