Results 1 to 9 of 9

Transpose Data Using Macro

Threaded View

  1. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Transpose Data Using Macro

    Try the attached
    Sub test()
        Dim r As Range, i As Long, x As String
        Application.ScreenUpdating = False
        With Cells(1).CurrentRegion.Resize(, 3).Columns(1)
            .Offset(, 4).Resize(, 2).Clear
            For Each r In .SpecialCells(2)
                r(1, 2).Resize(, 2).Copy r.Offset(, 4)
            Next
            For Each r In .SpecialCells(4).Areas
                For i = 1 To 2
                    x = r(0).Offset(, i).Resize(r.Count + 1).Address
                    r(0, 4 + i).Value = Join(Filter(Evaluate("transpose(if(" & _
                            x & "<>""""," & x & ",char(2)))"), Chr(2), 0), ",")
                Next
            Next
        End With
        Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to Transpose Data
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-17-2020, 01:07 AM
  2. [SOLVED] macro to transpose data
    By rhoda20 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2014, 08:39 AM
  3. [SOLVED] Macro To Transpose Data
    By AlexRoberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2014, 09:33 AM
  4. Macro to transpose data from one sheet to another
    By Cupragsw in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-26-2013, 12:17 PM
  5. Help with macro to transpose data
    By ejecheche in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2012, 06:26 AM
  6. Transpose Data Macro
    By Jakila2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2011, 03:56 PM
  7. Macro to Transpose the data
    By pandyav in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2010, 05:51 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