Link to home
Create AccountLog in
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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Please describe how you want the macro to work.
Avatar of Andrea Bernard
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
Avatar of Alan
Alan
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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
Thanks for the points. Oh wait, everybody but me received them.
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.