ComboBox and TextBox

Cr4ZyPP

New Member
Joined
Feb 20, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi.
I hope someone will be able to help me.

This is what I got.
2 customers, each customer have 5 material (2 of the is the same).
These 8 different materials have different weight and the 2 same materials have same weight.

Sheet1
Cell A1 Customer 1
Cell A2 Material 1
Cell A3 Material 2
Cell A4 Material 3
Cell A5 Material 4
Cell A6 Material 5


Cell B1 Customer 2
Cell B2 Material 6
Cell B2 Material 7
Cell B2 Material 8
Cell B2 Material 4
Cell B2 Material 1


Sheet2
A1, Material 1, B1 17,856, C1 1,984, D1 9
A2, Material 2, B2 17,226, C1 1,914, D2 9
A3, Material 3, B3 17,532, C1 1,948, D3 9
A4, Material 4, B4 18,552, C4 2,058, D4 9
A5, Material 5, B5 18,198, C5 2,022, D5 9
A6, Material 6, B6 22,644, C6 2,516, D6 9
A7, Material 7, B7 19,071, C7 2,119, D7 9
A8, Material 8, B8 19,683, C8 2,187, D8 9

Cell A1-A8 Material
Cell B1-B8 Total weight
Cell C1-C8 Weight for 1 pc
Cell D1-D8 9 pcs

This is solved. ComboBox 1 Customer, ComboBox2 Material.

This is what I need help with.
Based och the Customer and material from ComboBox, I need a TextBox where I can type in a surten weight eg. 200, then I need a calculation and a result in TextBox 2. That will calculate TextBox1 divided with the total weight from material (value in TextBox1 (200) divided with Material 1 (from ComboBox2, total weight is 17,756) 200/17,856 = 11 (need to have adjusted to the nearest number without decimal)).

Is this best to use a UserForm or direct in the Excel sheet. I would like to have a Userform that will open when the Excelfile is opened and have a close button that will close both Userfom and Excel sheet.

I hope this is possible.

Thanks for your help :)
Regards
//Patrik
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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