View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Abhay Abhay is offline
external usenet poster
 
Posts: 14
Default CONCATENATE in Array formula

Thanks Max. I thought may be some tricky way to handle using array formula.
What you have given addresses issue. regards,
Abhay


"Max" wrote:

Tinkered with a sub by Tom Ogilvy
http://tinyurl.com/2leq2z
which seems to do what you're after

Try the adaptation below on a spare copy of your sheet
Col C must be sorted first before running the sub

Sub ConcatColF()
'adapted from Tom Ogilvy posting:
'http://tinyurl.com/2leq2z
'Col C must be sorted

Dim lastrow As Long
Dim i As Long
lastrow = Cells(Rows.Count, 3).End(xlUp).Row
i = lastrow
Do While i 1
If Cells(i, 3).Value = Cells(i - 1, 3).Value Then
Cells(i - 1, 6).Value = Cells(i - 1, 6).Value & ", " & _
Cells(i, 6).Value
Cells(i, 3).EntireRow.Delete
End If
i = i - 1
Loop
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---