I would really appreciate it if you could take a look at the following and perhaps offer some advice...
I have data within a work sheet set out in the following way:
A B C D E F G H 1 Allocation Ref UPI AllocStatus AllocType TransType AllocStartDate PeriodDays Notes 2 1AD RENA1 Processing Rental Online 02/03/13 3 ... 3 1AD RENA2 Ready Rental Online 02/03/13 3 ... 4 1AD RETA3 Ready Rental Online 02/03/13 3 ... 5 2CB RENB3 Processing Sale Instore 06/07/13 2 ... 6 2CB RENA5 Ready Sale Instore 06/07/13 2 ... 7 3FE REN4D Processing Rental Online 13/09/13 5 ... 8 4BE RET44 Ready Sale Instore 22/11/2013 5 ...
I have a two listbox's, a textbox and a command button on a Userform, Listbox1 and Listbox2, textbox1 and commandbutton1.
I would like Listbox1 to populate itself with data from columns A, D, E, F and G of "Sheet1".
However, Listbox1 will need to sort Column A of the worksheet "AllocationRef", into one instance of each reference found. For example, using the above data listbox1 would look like this:
LISTBOX1
(Returns Column "A" data) (Returns Column "D" data) (Returns Column "E" data) (Returns Column "F" data) (Returns Column "G" data) 1AD Rental Online 02/03/13 3 2CB Sale Instore 06/07/13 2 3FE Rental Online 13/09/13 5 4BE Sale Instore 22/11/13 5
When a user selects a row of the listbox, e.g. "1AD", the textbox would show that there are 3 items associated with that reference. In the same way "2CB" would say there are 2 items associated etc.
When a user selects a row and then clicks the command button, I would like listbox2 to populate itself with the data in column B and C, relating to the selected ref ( i'll use "1AD" as the selected row in this example)...
LISTBOX2
(Returns Column "B" data) (Returns Column "C" data) RENA1 Processing RENA2 Ready RETA3 Ready
Hopefully that makes sense... Thanks in advance.
Bookmarks