+ Reply to Thread
Results 1 to 5 of 5

Transpose multiple rows to one column keping the row header.

Hybrid View

cinciphantom Transpose multiple rows to... 02-17-2011, 11:26 PM
stanleydgromjr Re: Transpose multiple rows... 02-18-2011, 12:01 AM
rylo Re: Transpose multiple rows... 02-18-2011, 12:10 AM
stanleydgromjr Re: Transpose multiple rows... 02-18-2011, 01:03 AM
watersev Re: Transpose multiple rows... 02-18-2011, 06:42 AM
  1. #1
    Registered User
    Join Date
    02-17-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Transpose multiple rows to one column keping the row header.

    So, I have many lists of emails and I need to create one list that has each email address (and only the email address) in a column with the email group specified on the left.

    Gonna have to do this on a periodic basis with large amounts of data starting... well... earlier today... so any help will be much appreciated!

    What I get, what I ended up with after text to columns & some text chopping, and what I actually need is in the file attached.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Transpose multiple rows to one column keping the row header.

    cinciphantom,

    Welcome to the Excel Forum.


    On Sheet1, what cell does your raw data group1 start in?
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Transpose multiple rows to one column keping the row header.

    Hi

    You will have to modify to suit your real data structure...

    Sub aaa()
      Dim OutSH As Worksheet
      Set OutSH = Sheets("Sheet2")
      
      Sheets("Sheet1").Select
      
      For Each ce In Range("A3:A5")
        arr = Split(ce.Offset(0, 1), "; ")
        For i = LBound(arr) To UBound(arr)
          outrow = OutSH.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
          OutSH.Cells(outrow, 1).Value = ce.Value
          OutSH.Cells(outrow, 2).Value = arr(i)
        Next i
      Next ce
      
      OutSH.Range("B:B").Replace what:="Alias <", replacement:=""
      OutSH.Range("B:B").Replace what:=">", replacement:=""
      
    End Sub
    rylo

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Transpose multiple rows to one column keping the row header.

    cinciphantom,

    Detach/open workbook ReorgData w1 wR - cinciphantom - EF764967 - SDG12.xlsm and run macro ReorgData.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Transpose multiple rows to one column keping the row header.

    check attachment, run macro "test"
    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)

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