Populate combobox based on text value in userform

namuser

New Member
Joined
Jan 21, 2014
Messages
4
Hi
I have a table with 3 columns: Products, Location and Quantity. I created a userform to add new products and the code runs fine. Still, I would like my userform to do the following:

-if someone tries to add a product and that product exist in different location, I would like to view those location in a combobox (?not sure, never used one). Under the combobox I would like to list number of locations ( like a text: Your products is listed in 3 other location). If I don't choose a location, the user can add a new one but if another location is chosen, a textfield called Quantity will be populated.

I hope this can be done, I searched the web but I didn't find anything similar to this. I don't even know if I should use a combobox for what I need.
I do hope someone can help me with an advice, a link or some code to get my started....

Thank you!
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,654
Office Version
365
Platform
Windows
How is the user adding a product and what/where are they adding it to?
 

namuser

New Member
Joined
Jan 21, 2014
Messages
4
in my initial work, the user added a product via userform to first empty cell in the table (sheet1). The userform had 3 textboxes: product name (unique), location (same unique item can be in different locations) and quantity.
My first intention was to create another userform only with a textbox for product name, and a search button. Pressing search would have populated another sheet (called locations) with all the locations and quantity where you can find that specific item.

But I would really like to be able to add products but also edit quantities for all product's locations (add and substract).
I'm realizing that doing this is not a simple task (at least for me) but I would like to know if this can be done...
 

Watch MrExcel Video

Forum statistics

Threads
1,102,274
Messages
5,485,783
Members
407,515
Latest member
franjey

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top