Excel function: Restricting list of products appearing on drop-down list

JKLM34

New Member
Joined
Jan 18, 2019
Messages
3
Project: I'm using Excel to create a receipt/invoice for buyers at a local high school auction. I have three pages in my excel workbook. First page: Buyer information (this will include their bid number), second page: products, third page: receipt/invoice. I'm using VLookup to grab the descriptions and price of each product to populate my invoice body. Is there a formula/function that can also populate the product number based on the buyer number that appears at the top of the invoice? I'd be ever so grateful... everything i've tried returns an error.

Because this is an auction, it's possible that the same buyer (bid number) could buy multiple items. Each product (only 1 qty) has a unique item number assigned. So, my product sheet is filled with 100s of items with their descriptions and prices. We won't know how many buyers we have until the evening of the auction, but when testing the receipt it's already a pain to scroll through the hundreds of product numbers when using the list option in data validation. We have student and elderly volunteers, so we need this to be simplified.

If that's wishful thinking, can you tell me how to limit the number of products that appear in the drop-down menu based on the bidder number so we're not combing through 100s of products to find the 3 or 4 items the buyer has won?

Your wisdom is greatly appreciated!! I'd attach screen shots, but being a new member I can't attach files. Hopefully you can visualize what I'm describing :)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi

Are you able to paste some sample data as this will help us come up with a solution for you
 
Upvote 0
Product page same looks like this:

[TABLE="width: 813"]
<colgroup><col><col><col><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]Sale #[/TD]
[TD]Tag #[/TD]
[TD]School[/TD]
[TD]Consignor[/TD]
[TD]Weight[/TD]
[TD]Product[/TD]
[TD]Buyer #[/TD]
[TD]Price[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]158[/TD]
[TD]163[/TD]
[TD]PCHS[/TD]
[TD]Lindsay Dunkle[/TD]
[TD]14.57[/TD]
[TD]Choice Ham[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]8.70[/TD]
[TD="align: right"]126.76[/TD]
[/TR]
[TR]
[TD]159[/TD]
[TD]164[/TD]
[TD]PCHS[/TD]
[TD]Lindsay Dunkle[/TD]
[TD]14.35[/TD]
[TD]Choice Ham[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]9.07[/TD]
[TD="align: right"]130.15[/TD]
[/TR]
[TR]
[TD]255[/TD]
[TD]361[/TD]
[TD]PHS[/TD]
[TD]McCoy Fitzwater[/TD]
[TD]19.00[/TD]
[TD]Good Ham[/TD]
[TD="align: right"]65[/TD]
[TD="align: right"]10.20[/TD]
[TD="align: right"]193.80[/TD]
[/TR]
[TR]
[TD]91[/TD]
[TD]213[/TD]
[TD]MHS[/TD]
[TD]Kristin Duncan[/TD]
[TD]24.00[/TD]
[TD]Choice Ham[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]11.00[/TD]
[TD="align: right"]264.00[/TD]
[/TR]
</tbody>[/TABLE]

Client Page sample looks like this:
[TABLE="width: 947"]
<colgroup><col><col><col><col span="3"><col><col></colgroup><tbody>[TR]
[TD]Buyer #[/TD]
[TD]Name[/TD]
[TD]Street[/TD]
[TD]City[/TD]
[TD]State[/TD]
[TD]Zipcode[/TD]
[TD]Phone Number[/TD]
[TD]Slicing Location[/TD]
[/TR]
[TR]
[TD="align: right"]4 [/TD]
[TD]Susan Miller[/TD]
[TD]2013 Excel Street[/TD]
[TD]Chicago[/TD]
[TD]IL[/TD]
[TD="align: right"]60611[/TD]
[TD][/TD]
[TD]Moorefield[/TD]
[/TR]
[TR]
[TD="align: right"]5 [/TD]
[TD]Markwood Construction[/TD]
[TD]testing testing[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Carry Out[/TD]
[/TR]
[TR]
[TD="align: right"]6 [/TD]
[TD]JR Keplinger[/TD]
[TD]testing 1234[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Pendleton[/TD]
[/TR]
[TR]
[TD="align: right"]16 [/TD]
[TD]Amy Baker[/TD]
[TD]2013 Microsoft Street[/TD]
[TD]Miami[/TD]
[TD]FL[/TD]
[TD="align: right"]33133[/TD]
[TD][/TD]
[TD]Moorefield[/TD]
[/TR]
[TR]
[TD="align: right"]30 [/TD]
[TD]Brian Green[/TD]
[TD]2010 VBA Road[/TD]
[TD]New York[/TD]
[TD]NY [/TD]
[TD="align: right"]10002[/TD]
[TD][/TD]
[TD]East Hardy[/TD]
[/TR]
[TR]
[TD="align: right"]65 [/TD]
[TD]Caroline Martin[/TD]
[TD]2007 Excel Road[/TD]
[TD]Los Angeles[/TD]
[TD]CA[/TD]
[TD="align: right"]87457[/TD]
[TD][/TD]
[TD]Pendleton[/TD]
[/TR]
</tbody>[/TABLE]



Invoice Looks like: (the client number calls the client information to fill the address. The slicing location is called for delivery of items to correct school for pickup) What I would like to happen is pasted below. The two orders that bidder number 65 won populate in the body below. Right now, I can only get the full list of products to populate.

[TABLE="width: 547"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Date:[/TD]
[TD="align: right"]1/18/2019[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 2"]Buyer:[/TD]
[TD] [/TD]
[TD]Buyer #:[/TD]
[TD="align: right"]65[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 2"]Caroline Martin[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 2"]2007 Excel Road[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 2"]Los Angeles[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]CA[/TD]
[TD]87457[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Sale #[/TD]
[TD] Description[/TD]
[TD]Bid Price[/TD]
[TD]Weight[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD="align: right"]255[/TD]
[TD] Good Ham[/TD]
[TD] $ 10.20[/TD]
[TD="align: right"]19[/TD]
[TD] $ 193.80[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD="align: right"]159[/TD]
[TD] Choice Ham[/TD]
[TD] $ 9.07[/TD]
[TD="align: right"]14.35[/TD]
[TD] $ 130.15[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Total[/TD]
[TD] $ 323.95[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Cash[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Check #[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Slicing Location[/TD]
[TD]Pendleton[/TD]
[TD] [/TD]
[TD]Balance[/TD]
[TD] $ 323.95[/TD]
[/TR]
[TR]
[TD="colspan: 5"] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="colspan: 5"][/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi JK,

So the main goal would be to auto-populate the invoice with products as selected from the buyer number drop down.

I've done a quick mock up of 2 versions, ranges & tables. On the ranges one you'll need to maintain the ranges in the formulas as you add rows to either your Buyers or Product lists.

The Table version allows you to add rows to Buyer & Products without having to maintain your formulas as they will update automatically with a little more setup.



See if you can use these;

Ranges
https://www.dropbox.com/s/ekmpg70i7y2p4bl/Invoice fill Buyer Drop Down_ranges.xlsx?dl=0

Table
https://www.dropbox.com/s/glh3161bb83g5zt/Invoice fill Buyer Drop Down_Table.xlsx?dl=0
 
Upvote 0
The Table version allows you to add rows to Buyer & Products without having to maintain your formulas as they will update automatically with a little more setup.

Tried them both. Leaning towards the table, though I'm not sure what you mean by 'with a little more setup'. I went ahead duplicated some of the buyer and product information to test the invoice. Looks great! I've also extended the invoice sheet to allow up to 10 items to populate on an invoice, which happened when I duplicated the information on the other sheets. No wonder I couldn't get the function to limit, I wasn't even close with my code. You're amazing! Thank you x infinity!

I noticed if I click on a cell with the formula it creates a #value remark, I would undo to remove it from the invoice page. Do you think I should lock down that section before turning it over to students? Or will that conflict with code?
 
Upvote 0
You're welcome thanks for the feedback.

Sheet protection works ok with formulas but vba can be tricky. I would only lock down the formula cells.

You could also use this cool dynamic named range trick for the data validation on E2 so that the buyer numbers will be dynamic as new buyers are added or removed from your Buyer info sheet;

https://www.youtube.com/watch?v=2O3fvlBHLzE
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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