Results 1 to 6 of 6

Complicated listbox code required...

Threaded View

  1. #1
    Registered User
    Join Date
    08-27-2009
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2007
    Posts
    45

    Complicated listbox code required...

    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.
    Last edited by RayJay01; 11-16-2013 at 04:32 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create Circular link between two workbooks
    By DUrekew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 05:55 PM
  2. Complicated and/or statment help required
    By AllenMead in forum Excel General
    Replies: 15
    Last Post: 10-10-2010, 08:42 AM
  3. Error 424 Object Required Error when Using AddItem to ListBox Generated in Code
    By jclark419 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2010, 12:47 PM
  4. Listbox data required
    By kuzniaj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2006, 01:34 PM
  5. Complicated formula help required
    By recklaw in forum Excel General
    Replies: 10
    Last Post: 03-21-2006, 08:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1