Filtering Results in List Box

JohnS_323

New Member
Joined
Oct 18, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm trying to create a spreadsheet that will be used for performing physical inventory verification. The process is that users will go through their physical inventory and type in a batch number and a material code into a data entry tab in the spreadsheet. This will be compared to a separate tab that has what our system says we should have on hand. In some cases, a batch number can be used to make several material codes and the person doing the count doesn't know which one they have. In these cases, I would like for them to enter the batch number into column A of the data entry sheet and have a list box in column B be filtered to show them only the materials that have that same batch number in the current inventory tab. I'm not sure how to pass a parameter across from a cell to a list box in Excel. I looked into dependent list boxes but that misses the mark. I could do it fairly easily in Access but the user community that will be utilizing this spreadsheet isn't familiar with Access.

Thanks in advance for any recommendations.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
For the dependent dropdown method you need a list created for each possible list of codes based on the batch I believe.

This should work for you using the FILTER() function and then INDIRECT() in the name manager.

I've created a small sheet that when I type a batch in to cell A2 it will update column H 'Filtered List' based on the data I have in columns E and F for a list of values to show in the dropdown in cell B2!

Batch 301225 entered in cell A2...
1729511115602.png

Batch 300325 entered in cell A2...
1729511152593.png


In cell H2 I have just this formula entered in it. It will return all matches found from this one cell...
Excel Formula:
=IFERROR(FILTER(F:F,E:E=A2),"")

In the name manager I have the following formulaentered in...
Excel Formula:
=INDIRECT("Sheet1!$H$2:$H$" & COUNTA(Sheet1!$H:$H)+1)
I have set this with '+1' at the end to allow for a blank entry. This is a fixed reference though and should you change the lookup to another column then this will need to have that change made to it. It will not pick it up otherwise.
1729511325562.png


This way you only need one list that can be used in the dropdown box in cell B2.

Hope this is of help!
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,142
Members
452,615
Latest member
bogeys2birdies

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