+ Reply to Thread
Results 1 to 4 of 4

creating a list from a table

Hybrid View

sss.seg creating a list from a table 09-17-2009, 09:57 AM
JBeaucaire Re: creating a list from a... 09-17-2009, 10:06 AM
sss.seg Re: creating a list from a... 09-17-2009, 11:53 AM
StephenR Re: creating a list from a... 09-17-2009, 12:52 PM
  1. #1
    Registered User
    Join Date
    09-17-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    4

    creating a list from a table

    Is there a way to convert a basic table, such as days of the week as column headings, months as row headings and values in each cell, into a list that would have January Monday Value
    January Tuesday Value
    January Wednes Value
    Etc.
    Attached Files Attached Files
    Last edited by sss.seg; 09-17-2009 at 10:54 AM. Reason: Attached a file with an example table and list

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: creating a list from a table

    Hi, sss.seg. Welcome to the forum.

    Absolutely, should be pretty straightforward. Click GO ADVANCED and use the paperclip icon to post up your workbook.

    Make sure the workbook shows a desired output on a separate sheet so we can see the goal clearly.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-17-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: creating a list from a table

    Thanks, JBeaucaire. I've added the attachment

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: creating a list from a table

    Try this:
    Sub x()
    
    Dim rng As Range, n As Long
    
    With Sheet1
        n = .Range("B4", .Range("B4").End(xlDown)).Rows.Count
        For Each rng In .Range("C3", .Range("C3").End(xlToRight))
            rng.Copy Sheet2.Cells(Rows.Count, "B").End(xlUp)(2).Resize(n)
            .Range("B4").Resize(n).Copy Sheet2.Cells(Rows.Count, "C").End(xlUp)(2)
            rng.Offset(1).Resize(n).Copy Sheet2.Cells(Rows.Count, "D").End(xlUp)(2)
        Next rng
    End With
    
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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