Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I have certain data in a column A(say). Now, in column A there are certain entries that are repeating.I want that the entries that are repeating two times should be displayed in column B, the items that are repeating three times are displayed in column C and so on. Kindly help.... With regards Harvinder Singh -- harvindersingh1 ------------------------------------------------------------------------ harvindersingh1's Profile: http://www.excelforum.com/member.php...o&userid=31725 View this thread: http://www.excelforum.com/showthread...hreadid=533627 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() The following macro should do this for you. I'm assuming that all the data is in column A and the rest of the sheet is empty Sub Reformat() LastRow = Cells(65536, 1).End(xlUp).Row For N = LastRow To 1 Step -1 If Application.CountIf(Range(Cells(1, 2), Cells(LastRow, 256)), Cells(N, 1)) 0 Then Cells(N, 1).Delete shift:=xlUp Else ItemCount = Application.CountIf(Columns(1), Cells(N, 1)) If ItemCount 1 Then If Cells(1, ItemCount) = "" Then Cells(1, ItemCount) = Cells(N, 1) Else Cells(65536, ItemCount).End(xlUp).Offset(1, 0) = Cells(N, 1) End If Cells(N, 1).Delete shift:=xlUp End If End If Next N End Sub -- mrice ------------------------------------------------------------------------ mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931 View this thread: http://www.excelforum.com/showthread...hreadid=533627 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting | New Users to Excel | |||
Sorting Data in ascending order | Excel Discussion (Misc queries) | |||
sorting non contiguous ranges | Excel Discussion (Misc queries) | |||
sorting number in ascending order | Excel Discussion (Misc queries) | |||
Adding a KeyID column for sorting | New Users to Excel |