Hi there,
Take a look at the attached modified version of your workbook and see if it does what you want.
A few points:
I've included a SUMIF formula to calculate the total lengths of all components not flagged with "x" in Column D
Instead of using the UserForm to specify the Attachment as being inserted between Joint X and Joint Y, the User selects the cell containing Joint X in Column A of the "Tally" worksheet (before displaying the UserForm), and the Attachment is automatically inserted on the row immediately underneath the selected cell.
The list of Casing Attachment names is specified in a table located on the "Attachments" worksheet - you should not leave any blank rows between these names. These names will be displayed in the dropdown list of the ComboBox on the UserForm. Up to 20 names may be inserted - if you need more, just increase the value in Cell B3.
The "Tally" worksheet contains four named (single cell) ranges and two Named Formulas which are used in the SUMIF formula mentioned above - if you delete Row 5 or the row containing the "Total Length" cell, neither the SUMIF formula nor the VBA code will work correctly. I don't know how you intend to use the worksheet, so I do not know what "Anti-Gorilla" protection is appropriate.
I hope the attached is useful for you - please let me know how you get on.
Greg M
Bookmarks