match among multiple combo boxes and multiple columns and update the values

Alaa mg

Active Member
Joined
May 29, 2021
Messages
344
Office Version
  1. 2019
hi

I have data in sheet1 and comboboxes (1 to 15) and textboxes (1 to 25) so when select items from comboxes and if I write the values in texboxes contain labels QTY1,2,3,4 then should match with the columns B,C,D and should overwrite the already values are existed and summing and the formula in textbox NET should be like this QTY1-QTY2-QTY3+QTY4 and copy all of the values to COL E,F,G,H,I

original data
1.PNG



the expected result
2.PNG
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
@Alaa mg
Could you upload a sample workbook (without sensitive data) to a free site such as dropbox.com or google drive & then share the link here?
 
Upvote 0
@Alaa mg
I've downloaded the file.
1. You populate the code via Rowsource, but the formula of the named range is like this; =#REF!#REF!
so I can't get the combobox to work.
2. In Private Sub Workbook_Open, the code refer to a directory/files that I don't have so I deleted the Sub.
3. How many rows is your original data? hundreds? thousands?
4. Could you explain in more detail the data entry process? First you choose items via combobox then what?
5. Is it possible you choose combination of items that doesn't match data in the sheet? For example: BT-SW-1000 CC-OO-1000 IT
 
Upvote 0
about the point 3 my data at least 4000 rows

about 4 when select combo box it should populate the values in textbox if there are existed and if I change the value then should overwriting it and summing for instance if populate in textbox value 5 and I rewrite value in the same textbox is 2 then when update the value in sheet should be 7 and if there is empty cell and add value then should add to it

items that doesn't match data in the sheet? For example: BT-SW-1000 CC-OO-1000 IT

then should show message " this is item is not available, do you want entering this item" if I press yes then should add all of data from multiple textboxes and comboboxed to sheet and if I press no then nothing happens

finally about rowsource if you have code to make dynamically in multiple comboboxes without duplicated and empty it will be a great
 
Upvote 0
Ok, I understand the requirement.
I'll try to write the code tomorrow.
 
Upvote 0
Try this:

1. I put formula in col I: =E2-F2-G2+H2
2. You need a helper column (col M), you may change it in this line:
Set c = .Range("M1").Resize(n - 1, 1) 'helper column

3. You may change the sheet's name in this line:
Private Const Shn As String = "Sheet1"

4. After filling data in the combobox & textbox, hit the command button.

the workbook:

Alaa mg 1
 
Upvote 0
firs thanks for your help

second I'm asking about helper column (col M) is it necessary use it ? is not way just do that like the others columns B,C without use helper column ?

third when I press repeatedly the button of course it will change the values continuously may be press unintentionally then the values become wrong , so to overcome this problem I would show message and issue sound of warning message "you entered already the values, do you want continuing" if press ok then continue calculating if press no nothing happens

fourth when add a new data should increment the numbers in COL A(ITEM) .
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

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