Sub RemoveDuplicates()
For Row = 25 To 2 Step -1
If Cells(row,"A").Value = _
Cells(Row - 1, "A").Value Then
s = s & Cells(row,"M").Value & ", "
Rows(Row).Delete
Else
if s < "" then
cells(row,"M").Value = s & ", " & _
cells(row,"M").Value
s = ""
end if
End If
Next Row
End Sub
--
Regards,
Tom Ogilvy
"bisjom" wrote in
message ...
Hi guys..
I got problem..
I have a sheet with details of students with their textbook id and its
details. Same sutdent can have different textbookid .
I have to sort the student and remove the duplicates.. but while
removing the duplicate student, i have to display all the textbook id
in the textbookid column. say..
If the student A got 3 different textbook id (Column say 'M') 32,35,36
in three different rows, while removing , the row of the student A
should have column 'M' with the value 32,35,36.. how can o do that ..
the function used for duplicate is simple:
Sub RemoveDuplicates()
For Row = 25 To 2 Step -1
If Cells(25,"A").Value = Cells(Row - 1, "A").Value
Then
Rows(Row).Delete
End If
Next Row
End Sub
please help
--
bisjom
------------------------------------------------------------------------
bisjom's Profile:
http://www.excelforum.com/member.php...o&userid=31206
View this thread: http://www.excelforum.com/showthread...hreadid=510448