+ Reply to Thread
Results 1 to 7 of 7

Custom Lists

Hybrid View

cmerenbloom Custom Lists 12-08-2017, 01:20 PM
sandy666 Re: Custom Lists 12-08-2017, 01:35 PM
cmerenbloom Re: Custom Lists 12-08-2017, 01:49 PM
sandy666 Re: Custom Lists 12-08-2017, 01:51 PM
cmerenbloom Re: Custom Lists 12-08-2017, 01:52 PM
sandy666 Re: Custom Lists 12-08-2017, 01:56 PM
ranman256 Re: Custom Lists 12-08-2017, 01:58 PM
  1. #1
    Registered User
    Join Date
    12-08-2017
    Location
    NC
    MS-Off Ver
    2016
    Posts
    3

    Custom Lists

    Hello- I need to figure out a way to make a 2-column list, pulling values from several other lists.
    I want the first column to list the items, and the second column to indicate from which original list the item came. If items appear in more than one list, they should appear multiple times.

    I want to take this:
    [List 1][List 2][List 3]
    A A F
    B D B
    C E E

    And get this:
    [Item][List that Item is In]
    A List 1
    A List 2
    B List 1
    B List 3
    C List 2
    D List 2
    E List 2
    E List 3
    F List 3

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Custom Lists

    With PowerQuery (Get&Transform)

    is that what you want?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-08-2017
    Location
    NC
    MS-Off Ver
    2016
    Posts
    3

    Re: Custom Lists

    Yes! I just don't know the steps to get there...

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Custom Lists

    steps in PowerQuery or ... ?

    It's a good point to read this: Getting Started with Get & Transform in Excel 2016

  5. #5
    Registered User
    Join Date
    12-08-2017
    Location
    NC
    MS-Off Ver
    2016
    Posts
    3

    Re: Custom Lists

    Correct, I've never used PowerQuery

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Custom Lists

    So read article from the link above

    in the meantime:
    click on the range
    go to DATA tab - Get&Transform
    From Table
    in new window select all columns
    from the menu select Unpivot Columns
    sort column(s) as you wish
    Close&Load result query into the sheet

  7. #7
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Custom Lists

    try:

    Sub aListBreakup()
    Dim shtSrc As Worksheet, shtTarg As Worksheet
    Dim r As Long, c As Long
    Dim vHdr
    
    Set shtSrc = ActiveSheet
    Sheets.Add
    Set shtTarg = ActiveSheet
    shtSrc.Activate
    
        Range("A1").Select
        For c = 1 To 3
            vHdr = ActiveCell.Value    'get header name
            NextRow
            Range(Selection, Selection.End(xlDown)).Select
            If c = 1 Then r = Selection.Rows.Count
            
            GoSub CopyPasteCol
            
               'move to next col
            'Selection.Offset(0, 1).Select
            Range("A1").Select
            ActiveCell.Offset(0, c).Select  'next column
        Next
        shtTarg.Activate
    
    Set shtSrc = Nothing
    Set shtTarg = Nothing
    Exit Sub
    
    CopyPasteCol:
        Selection.Copy
        shtTarg.Select
        ActiveSheet.Paste
        Selection.Offset(0, 1).Select
        Selection.Value = vHdr
        
        Application.CutCopyMode = False
           'goto next free cell
        Range("A2").Select
        Selection.End(xlDown).Select
        NextRow
        shtSrc.Activate
    Return
    End Sub
    
    Private Sub NextRow()
            ActiveCell.Offset(1, 0).Select  'next column
    End Sub

+ 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. Working with custom lists
    By twlove@ontuet.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2006, 10:43 AM
  2. Custom Drop Down Lists
    By samprince in forum Excel General
    Replies: 2
    Last Post: 07-21-2006, 04:45 PM
  3. Custom Lists
    By Natasha in forum Excel General
    Replies: 3
    Last Post: 04-26-2006, 11:20 AM
  4. Storing custom lists
    By gimboid13 in forum Excel General
    Replies: 1
    Last Post: 03-16-2006, 08:56 PM
  5. [SOLVED] Custom Lists in Excel
    By Custom Lists in Excel in forum Excel General
    Replies: 1
    Last Post: 10-24-2005, 03:05 PM
  6. [SOLVED] Using/referencing custom lists
    By KR in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-21-2005, 03:05 PM
  7. [SOLVED] Custom Lists
    By Debbie in forum Excel General
    Replies: 1
    Last Post: 08-19-2005, 12:05 PM
  8. [SOLVED] Custom Lists
    By BuddyB in forum Excel General
    Replies: 3
    Last Post: 02-27-2005, 07:06 PM

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