calculation by userform based on selected combobox to summing or subtraction

Mussa

Board Regular
Joined
Jul 12, 2021
Messages
241
Office Version
  1. 2019
  2. 2010
Hello
I want matching selected comboboxes on userform with sheet B: E and summing or subtraction based on selected from combobox 20
so the numbers for comboboxes & textboxes will be for each row on userform like this
combobox1 combobox2 combobox3 combobox4 ,textbox1
combobox5 combobox6 combobox7 combobox8,textbox2
combobox9 combobox10 combobox11 combobox12,textbox3

the data in sheet


combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-11,000.00
32DD-AA-2INV-TR2ORD-NN-2CUST-22,000.00
43DD-AA-3INV-TR3ORD-NN-3CUST-33,000.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,000.00
STOCK


when select combobox 20 SALES
1.PNG


so should subtract the QTY from textboxes to column F
to become in column F
combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1500.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,500.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,500.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,000.00
STOCK


when select RET1
the data in sheet

combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1500.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,500.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,500.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,000.00
STOCK



2.PNG


so should subtract the QTY from textboxes to column F
to become in column F

combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1400.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,400.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,500.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,000.00
STOCK


when select PURCHASE from combobox20
the data in sheet

combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1400.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,400.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,500.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,000.00
STOCK



3.PNG


so should summing the QTY from textboxes to column F
to become in column F


combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1420.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,400.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,520.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,020.00
STOCK


when select RET2 from combobox20
data in sheet
combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1420.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,400.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,520.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,020.00
STOCK


4.PNG



so should summing the QTY from textboxes to column F
to become in column F
combobox2.xlsm
ABCDEF
1ITEMBATCH INVOICE NOORDER NOCUSTOMER NO QTY
21DD-AA-1INV-TR1ORD-NN-1CUST-1420.00
32DD-AA-2INV-TR2ORD-NN-2CUST-21,400.00
43DD-AA-3INV-TR3ORD-NN-3CUST-32,550.00
54DD-AA-4INV-TR4ORD-NN-4CUST-44,020.00
STOCK

I hope this clear .
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
about one week nobody answers me!
anybody help me, guys?
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,266
Members
449,093
Latest member
Vincent Khandagale

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