Please Login or Register to view this content.
Try the attached.
Last edited by devpp; 08-26-2013 at 09:26 AM.
Hi devpp,
Try this code :
Please Login or Register to view this content.
GC Excel
If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.
Try this :
PHP Code:
Sub ExtractData()
Dim i As Long, k As Long, j As Long, jJ As Long
Dim sArr(), dArr(), Dic
sArr = Range("A2:F15").Value
ReDim dArr(1 To UBound(sArr, 1), 1 To 6)
Set Dic = CreateObject("scripting.dictionary")
For i = 1 To UBound(sArr, 1)
With Dic
If Not .Exists(sArr(i, 1)) Then
k = k + 1
.Add sArr(i, 1), k
For j = 1 To 6
dArr(k, j) = sArr(i, j)
Next j
Else
jJ = .Item(sArr(i, 1))
dArr(jJ, 3) = dArr(jJ, 3) & "," & sArr(i, 3)
dArr(jJ, 4) = dArr(jJ, 4) & "," & sArr(i, 4)
End If
End With
Next
[A19:F50].ClearContents
If k Then [A19].Resize(k, 6).Value = dArr
End Sub
Last edited by sunflowers; 08-26-2013 at 09:48 AM.
See my post #3
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks