+ Reply to Thread
Results 1 to 2 of 2

Item Sequencing Based on Selection (Sequence or Random Pick)

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    Malaysia
    MS-Off Ver
    MS2013
    Posts
    30

    Item Sequencing Based on Selection (Sequence or Random Pick)

    Dear All,

    I would like to know is there a way to arrange a specific list of item or in this case instruction based on user selection (either random pick from the list without caring much about the sequence or sequential pick).

    I have prepared an example to explain my problem in detail. (Please refer to the spreadsheet)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Item Sequencing Based on Selection (Sequence or Random Pick)

    With a small Userform

    Private Sub ComboBox1_Click()
    ListBox1.AddItem (ComboBox1)
    End Sub
    Private Sub CommandButton1_Click()
    Dim lr As Long, mycol As Long
    Sheets("sheet2").Cells.ClearContents
    For x = 0 To ListBox1.ListCount - 1
        With Sheets("sheet1")
            mycol = Application.Match(Me.ListBox1.List(x), .Range("A2", "Z2"), 0)
            lr = Sheets("sheet2").Range("B" & Rows.Count).End(xlUp).Row
            .Cells(2, mycol).Copy Sheets("sheet2").Range("A" & lr + 1)
            .Range(.Cells(3, mycol), .Cells(13, mycol)).Copy Sheets("sheet2").Range("B" & lr + 1)
        End With
    Next
    Unload Me
    Application.Goto reference:=Sheets("sheet2").Range("A1"), Scroll:=True
    End Sub
    Private Sub UserForm_Initialize()
    ComboBox1.List = Array("1st Destination", "2nd Destination", "3rd Destination", "4th Destination", "5th Destination", "6th Destination")
    End Sub
    Kind regards
    Leo
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Item Sequencing
    By keby1nko in forum Excel General
    Replies: 3
    Last Post: 01-09-2015, 02:08 AM
  2. [SOLVED] Select from drop down menu then assign unique sequence based on selection and year
    By evgn12 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-22-2014, 04:52 PM
  3. uner what creteria random formulae pick up next random value?
    By roofi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-16-2014, 12:55 AM
  4. Replies: 1
    Last Post: 10-09-2013, 11:44 AM
  5. Replies: 1
    Last Post: 01-27-2012, 04:44 PM
  6. Multi select Listbox Items selection based on other Listbox item selection.
    By srinivassathi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 05:53 AM
  7. Replies: 8
    Last Post: 08-14-2009, 11:22 AM

Tags for this Thread

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