ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Arrangement (https://www.excelbanter.com/excel-discussion-misc-queries/83691-arrangement.html)

harvindersingh1

Arrangement
 

I have certain data in column A. Some quantities are repeating, some are
repeating two times some 3 times and so on. *I want duplicate entries to
be removed in column A*.


With regards
harvinder


--
harvindersingh1
------------------------------------------------------------------------
harvindersingh1's Profile: http://www.excelforum.com/member.php...o&userid=31725
View this thread: http://www.excelforum.com/showthread...hreadid=533644


[email protected]

Arrangement
 
First, you have to sort all the records with respect to column A.
then run this vba code to remove all the duplicates.

Sub RemoveDuplicate()

totalrows = ActiveSheet.UsedRange.Rows.Count
For Row = totalrows To 2 Step -1
If Cells(Row, 1).Value = Cells(Row - 1, 1).Value Then
Rows(Row).Delete
End If
Next Row

End Sub


Bryan Hessey

Arrangement
 

If you refer to your other post, and use my original formula for
displaying duplicates, ie:

=IF($A2=$A1,"",IF($A2<INDIRECT("$A"&ROW()+COLUMN( )-2),"",INDIRECT("$A"&ROW()+COLUMN()-2)))


then you can copy the whole sheet, and paste special = Values (back
over itsself), then remove column A

--

harvindersingh1 Wrote:
I have certain data in column A. Some quantities are repeating, some are
repeating two times some 3 times and so on. *I want duplicate entries to
be removed in column A*.


With regards
harvinder



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=533644



All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com