+ Reply to Thread
Results 1 to 3 of 3

Transpose Duplicate rows into columns including blank cells

  1. #1
    Registered User
    Join Date
    03-04-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Transpose Duplicate rows into columns including blank cells

    Hi,

    I found this great macro to use in a spreadsheet I'm trying to transpose from rows to columns, however, I need a place holder for blank cells:

    http://www.excelforum.com/excel-prog...o-columns.html

    I was able to use the macro in the last post by Ochenden but the blank cells need to have a placeholder.

    Can anyone change the macro or come up with a different script for me to use?

    Attached is how I need the spreadsheet to look.

    Script I used:

    Sub aaa()
    Dim OutSH As Worksheet
    Set OutSH = Sheets("Sheet2")

    Range("A:A").AdvancedFilter Action:=xlFilterCopy, copytorange:=OutSH.Range("A1"), Unique:=xlYes

    'determine last column based on header
    lastcol = Cells(1, Columns.Count).End(xlToLeft).Column

    For Each ce In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
    Set findit = OutSH.Range("A:A").Find(what:=ce.Value)
    For i = 2 To lastcol
    OutSH.Cells(findit.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Value = Cells(ce.Row, i).Value
    Next i
    Next ce
    With OutSH
    End With
    End Sub


    Thanks,Transpose_Duplicates_Examples.xlsx

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

    Re: Transpose Duplicate rows into columns including blank cells

    Different method
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-04-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Transpose Duplicate rows into columns including blank cells

    Thank you!!

    This is exactly what I was looking for to solve my issue.

    Your help is much appreciated!

+ 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. transpose duplicate rows to columns
    By slabbbe in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-01-2021, 06:11 PM
  2. Transpose duplicate rows into columns
    By Ochenden in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2016, 03:44 PM
  3. Transpose Duplicate Rows to Separate Columns
    By VEL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-26-2012, 01:08 PM
  4. Mass transpose cells for duplicate rows
    By reliccross in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-28-2011, 12:46 PM
  5. Count blank cells within a range not including fully blank rows
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-16-2008, 09:43 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