Results 1 to 18 of 18

Macro Needed to Concatenate Data in separate ROWS

Threaded View

  1. #5
    Registered User
    Join Date
    02-06-2015
    Location
    Italy
    MS-Off Ver
    Office 2007 & 2013
    Posts
    78

    Re: Macro Needed to Concatenate Data in separate ROWS

    Quote Originally Posted by jindon View Post
    http://www.excelforum.com/excel-prog...ml#post3981768
    Change to
    Sub test()
        Dim a, i As Long
        With Range("a1", Range("a" & Rows.Count).End(xlUp)).Resize(, 2)
            a = .Value
            With CreateObject("Scripting.Dictionary")
                .CompareMode = 1
                For i = 1 To UBound(a, 1)
                    If a(i, 1) <> "" Then
                        If Not .exists(a(i, 1)) Then
                            .Item(a(i, 1)) = .Count + 1
                            a(.Item(a(i, 1)), 1) = a(i, 1)
                            a(.Item(a(i, 1)), 2) = a(i, 2)
                        Else
                            a(.Item(a(i, 1)), 2) = _
                            Join(Array(a(.Item(a(i, 1)), 2), a(i, 2)), "-")
                        End If
                    End If
                Next
                i = .Count
            End With
            .Offset(, .Columns.Count + 2).Resize(i, 2).Value = a
        End With
    End Sub

    Sorry but It doesn't appears nothing on sheet 2 with this code;
    And with the previous thread code you coded, with a large file sometimes It doesn't appear nothing or It says "end of memory error"
    Last edited by 823; 02-21-2015 at 06:48 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro Needed to Concatenate Data in separate COLUMNS
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-11-2015, 04:34 PM
  2. [SOLVED] Macro Needed to Concatenate Data in separate ROWS
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-21-2015, 11:35 AM
  3. [SOLVED] Macro needed to Concatenate data in 2 separate tables of 2 separate sheets
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-08-2015, 02:02 PM
  4. [SOLVED] Macro needed to Concatenate Data in separate TABLES
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-08-2015, 07:42 AM
  5. [SOLVED] VBA/Macro help needed for splitting wrapped cell values into separate (bottom) rows
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 01:30 PM

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