Hello all. I'm sure this is possible but I think I may be venturing into arrays, which I don't have a lot of understanding of. I have a listbox that populates a range of values (Strings) from a sheet. Each string value has a unique value attributed to it, however there are only a handful of string variables. The unique data value can be associated with different groups as well. For example, 2 columns (group, name) with n different groups with each group containing unique data values like below:
A B
Group1 value1
Group1 value2
Group2 value1
Group2 value2
Group3 value3
Group4 value1
Group4 value2
Group5 value1
...
The listbox shows up:
Group1
Group2
Group3
Group4
...
Right now my delete routine can select say Group2 (which then removes value1) and removes the row and moves up, however value2 remains obviously. I would like to remove all values (rows and objectively Group2 as well) associated with Group2 and move rows up as the current routine does. Since The Groups values can grow to n+1, how would vba identify that all values associated with a listbox selected group be removed? Below is my delete code to remove only one line at a time:
Please Login or Register  to view this content.