View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default help creating a marco please

Maybe this?
Sub lineuplikeValues()
mc = 1' change to your column NUMBER
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
If Cells(i, mc) = Cells(i - 1, mc) Then
Cells(i - 1, mc + 1).Value = _
Cells(i - 1, mc + 1) & ", " & Cells(i, mc + 1)
Rows(i).Delete
End If
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"lsy" wrote in message
...
name lx
A H1
A H1
A H2
A H3
B H1
B H2

name lx
A H1£¬H2£¬H3
B H1£¬H2
thx
excel2003