Hello, I am new to vba and I am trying to make a user form and then have data index to different work sheets. Each form may have a different number of data entries, for example, one particular batch may use 10 units, and another batch may only use 2. Id like excel to be able to count how many data entries are on the particular form and only index that amount of data.
Specifically, each form has 1 lot # but multiple, lets say "barrels', that make up the batch. Batch 1 might have 3 and batch 2 might have 10. Id like excel to index barrel #s to column B and then put the respective batch number in the corresponding column A.
What I have so far is below. It is taking the values of the text boxes on my form and indexing them where needed. The issue i am having is there is 20 text boxes for 'barrels' but if I only need 3, I still get 20 lot #s. I have been trying to do an if statement to only put lot #s where there are containers, but I am struggling.
Please Login or Register to view this content.
Mod note: code tags added. Please do this yourself in future. Thanks.
Bookmarks