How to create a Lookup values from two combobox on a userform

Ciupanezul21

New Member
Joined
May 16, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
TEST STAP LUCRU_V2.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAP
1Product codeProduct nameStock policy code01.12.202002.12.202003.12.202004.12.202009.12.202010.12.202011.12.202014.12.202015.12.202016.12.202017.12.202018.12.202021.12.202022.12.202023.12.202024.12.202025.12.202030.12.202011.01.202112.01.202113.01.202114.01.202115.01.202118.01.202119.01.202120.01.202121.01.202122.01.202123.01.202125.01.202126.01.202127.01.202128.01.202129.01.202130.01.202105.02.202112.02.202113.02.2021TOTAL Product name/01.12.2020-13.02.2021
2LB001K1 COMMAND112
3LB001K2COMMAND112
4LB002K1 LEFT ARM WHITE SOFACOMMAND108877225130
5LB002K2 LEFT ARM WHITE SOFACOMMAND10212
6LB002K3 SOFA WHITE SEATCOMMAND109118158133
7LB002K4 ACCESORIICOMMAND1578194
8LB003K1COMMAND1215265
9LBX01K1COMMAND10117890
10LBX02K1 STOL WHITE COMMAND101117121
11LBX02K2 PILLOW WHITE STOLCOMMAND22
12LBX02K1COMMAND22
13TOTAL/DAY1101045208010177079101811011201020010001040830778
14
15EXAMPLE
16
17TOTAL Product name/01.12.2020-13.02.2021TOTAL Product code/01.12.2020-13.02.2021
18K1 LEFT ARM WHITE SOFA130=SUM($D4:$AO4)LB002369=SUM(C18:C21)
19K2 LEFT ARM WHITE SOFA12=SUM($D5:$AO5)
20K3 SOFA WHITE SEAT133=SUM($D6:$AO6)
21K4 ACCESORII94=SUM($D7:$AO7)
22TOTAL Product code/01.12.2020-13.02.2021
23K1 STOL WHITE 21=SUM($D10:$AO10)LBX0223=SUM(C23:C24)
24K2 PILLOW WHITE STOL2=SUM($D11:$AO11)
25
26
27TOTAL/DAY
28=SUM(D$2:D$12)
29
30
31
DATA
Hello dear excel lovers. I am new to this wonderful community and I am also new to the field of VBA excel. Every day I try to learn new things. I would like to mention that this is a topic given by a professor in order to enter the entrance exam. If you could help me and if you have time, in creating a userform that would search for me and calculate according to 2 criteria (product code and date) the following products according to the attached table. according to the images attached to the user form * the first boxes (textbox and combobox for data) are the search criteria * the following boxes are with the answers I want to find out according to the above criteria (textbox and combobox for data). But here I got stuck. A structure (Product code) can be made up of 1 or more packages (Product name), if the structure has several packages (ex k1, k2, k3, etc) to show me the boxes with results depending on how many packages it has structure. If the structure has 2 packages, 2 rows of results should appear to me, if it has 3, 3 rows of results should appear to me, if it has 1, only 1 row of results should appear * the next step is to calculate the total amount of quantities for each package according to the selected date * the next step is to calculate the total amount of quantities for each package from the first date in the table to the final date in the table. But the same condition applies as the one above the rows of results will appear depending on how many packages the structure has. The final step is to add the data resulting from the above process to the next sheet (PROCES). provided that the structures that have more packages the total amount to be in a joint cell depending on how many packages it has. that is: if the structure has 4 packages the cell merges from 4 cells if it has 3 packages to merge from 3 cells and with the desired result. I will attach 3 images that may clarify you in what I said above. P.S. Thank you for your time .
Cell Formulas
RangeFormula
AP2:AP12AP2=SUM($D2:$AO2)
D13:AO13D13=SUM(D$2:D$12)
C18:C21C18=SUM($D4:$AO4)
D18:D21,J23,D23:D24,J18D18=FORMULATEXT(C18)
I18I18=SUM(C18:C21)
C23:C24C23=SUM($D10:$AO10)
I23I23=SUM(C23:C24)
G28G28=FORMULATEXT(D13)
 

Attachments

  • model3.png
    model3.png
    93 KB · Views: 18
  • M1.png
    M1.png
    51.5 KB · Views: 20
  • M2.png
    M2.png
    38.8 KB · Views: 20

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,933
Messages
6,175,481
Members
452,647
Latest member
MatthewBiersay

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