+ Reply to Thread
Results 1 to 44 of 44

pivot table not listing things in one row

Hybrid View

COLTS12OG pivot table not listing... 01-24-2013, 09:47 PM
jeffreybrown Re: Lord please help!! 01-24-2013, 09:49 PM
jeffreybrown Re: pivot table not listing... 01-24-2013, 10:27 PM
COLTS12OG Re: pivot table not listing... 01-24-2013, 10:35 PM
jeffreybrown Re: pivot table not listing... 01-24-2013, 10:46 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 12:50 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 01:00 PM
oeldere Re: pivot table not listing... 01-25-2013, 01:51 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 02:07 PM
oeldere Re: pivot table not listing... 01-25-2013, 02:14 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 02:25 PM
jeffreybrown Re: pivot table not listing... 01-25-2013, 02:28 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 02:28 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 02:40 PM
oeldere Re: pivot table not listing... 01-25-2013, 02:42 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 02:46 PM
jeffreybrown Re: pivot table not listing... 01-25-2013, 02:44 PM
swhitesell Re: pivot table not listing... 01-25-2013, 08:04 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 08:17 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 09:07 PM
jaslake Re: pivot table not listing... 01-25-2013, 09:25 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 09:31 PM
benishiryo Re: pivot table not listing... 01-25-2013, 09:54 PM
COLTS12OG Re: pivot table not listing... 01-25-2013, 10:05 PM
oeldere Re: pivot table not listing... 01-26-2013, 03:48 AM
COLTS12OG Re: pivot table not listing... 01-26-2013, 02:17 PM
jaslake Re: pivot table not listing... 01-27-2013, 01:01 PM
jaslake Re: pivot table not listing... 01-26-2013, 12:19 PM
COLTS12OG Re: pivot table not listing... 01-26-2013, 02:16 PM
jaslake Re: pivot table not listing... 01-26-2013, 02:21 PM
oeldere Re: pivot table not listing... 01-27-2013, 04:05 AM
VKS Re: pivot table not listing... 01-27-2013, 01:40 PM
swhitesell Re: pivot table not listing... 01-28-2013, 12:18 PM
COLTS12OG Re: pivot table not listing... 01-28-2013, 03:36 PM
jaslake Re: pivot table not listing... 01-28-2013, 03:40 PM
COLTS12OG Re: pivot table not listing... 01-28-2013, 04:10 PM
jaslake Re: pivot table not listing... 01-28-2013, 04:16 PM
COLTS12OG Re: pivot table not listing... 01-28-2013, 04:25 PM
jaslake Re: pivot table not listing... 01-28-2013, 08:55 PM
jindon Re: pivot table not listing... 01-29-2013, 02:42 AM
COLTS12OG Re: pivot table not listing... 01-29-2013, 06:01 PM
jaslake Re: pivot table not listing... 01-29-2013, 06:07 PM
COLTS12OG Re: pivot table not listing... 01-29-2013, 06:23 PM
jaslake Re: pivot table not listing... 01-29-2013, 06:35 PM
  1. #1
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pivot table not listing things in one row

    HI COLTS12OG

    This Code works on your Sample File. It'll need to be reworked a bit to handle your Real File. Please provide the information requested.

    The Merge Rows Code was adapted from Code written by Jindon here
    http://www.excelforum.com/excel-prog...e-columns.html

    Run the Code with Sheet yty active. Let me know of issues.
    Option Explicit
    Dim LR As Long
    Dim LC As Long
    Dim Rng As Range
    Dim i As Long
    
    Sub Delete_Empty_Rows()
        With ActiveSheet
            LR = .Cells.Find("*", .Cells(Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
                    SearchDirection:=xlPrevious).Row
    
            LC = .Cells.Find(What:="*", After:=[A1], _
                    SearchOrder:=xlByColumns, _
                    SearchDirection:=xlPrevious).Column
            Set Rng = .Range("D2:D" & LR)
            With Rng
                For i = LR To 1 Step -1
                    Application.ScreenUpdating = False
                    If Not IsNull(Rng(i).Resize(1, LC - 3).Text) Then
                        Rng(i).EntireRow.Delete
                    End If
                Next i
            End With
            .UsedRange.Replace What:="-*", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, _
                    MatchCase:=False, SearchFormat:=False, ReplaceFormat:=True
    
            Call Merge_Rows
            
            .UsedRange.Offset(1, 3).NumberFormat = "h:mm"
        End With
        Application.ScreenUpdating = True
    
    End Sub
    
    ' From http://www.excelforum.com/excel-programming-vba-macros/893749-merge-duplicate-rows-and-combine-data-in-some-of-the-same-columns.html
    Sub Merge_Rows()
        Dim Dic As Object
        Set Dic = CreateObject("Scripting.Dictionary")
        With Range("A1").CurrentRegion
            For i = 1 To .Rows.Count
                If i < .Rows.Count Then
                    If Not Dic.exists(.Cells(i, 2).Value) Then
                        Set Dic(.Cells(i, 2).Value) = .Rows(i).Range(Cells(1, 4), Cells(1 & LC))
                    Else
                        Dic(.Cells(i, 2).Value).Value = _
                                .Parent.Evaluate(Dic(.Cells(i, 2).Value).Address & "&" _
                                & .Rows(i).Range(Cells(1, 4), Cells(1 & LC)).Address)
                        .Rows(i).EntireRow.Delete
                        i = i - 1
                    End If
                End If
            Next
        End With
    End Sub
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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