+ Reply to Thread
Results 1 to 11 of 11

Transpose data macro

Hybrid View

  1. #1
    Registered User
    Join Date
    12-08-2015
    Location
    Ottawa
    MS-Off Ver
    2010
    Posts
    25

    Re: Transpose data macro

    Hi there,
    not sure how urgent your request is, but here is a way to do it with formulas.
    I start by creating a flag to bring all the "Unique values in". Filter and paste them.
    The rest is just offset formulas to bring all the entries underneath it in.
    Hope this helps.
    Attached Files Attached Files

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Transpose data macro

    Try this:-
    The code assumes that there are Blank rows between each set of data in column "A".
    Sub MG11Dec07
    Dim Rng As Range, Dn As Range, c As Long, Ac As Long, R As Range, t
    Set Rng = ActiveSheet.Range("A:A").SpecialCells(xlCellTypeConstants)
        ReDim ray(1 To Rng.Count, 1 To 1)
            For Each Dn In Rng.Areas
                c = c + 1: Ac = 0
                For Each R In Dn
                    Ac = Ac + 1
                    If UBound(ray, 2) < Ac Then ReDim Preserve ray(1 To Rng.Count, 1 To Ac)
                        ray(c, Ac) = R.Value
                Next R
        Next Dn
    
    With Range("C1").Resize(c, UBound(ray, 2))
        .Value = ray
        .Columns.AutoFit
        .Borders.Weight = 2
    End With
    End Sub
    Regards Mick

+ 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. Macro to Transpose Data
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-17-2020, 01:07 AM
  2. [SOLVED] Transpose Data Using Macro
    By Jbrowning1980 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2015, 12:57 PM
  3. [SOLVED] macro to transpose data
    By rhoda20 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2014, 08:39 AM
  4. [SOLVED] Macro To Transpose Data
    By AlexRoberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2014, 09:33 AM
  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