Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Duplicate Values

If I have the following data:

1
1
1
2
2
2
3
3
3
1
1
1
2
2
2

How will I get the following output?

1
2
3
1
2

instead of what excel is giving me?

1
2
3

Someone please advice...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 563
Default Duplicate Values

Let's say you data is in A1:A100
In B1 entrer 0
In B2 enter =IF(A2=A1,1,0)
Copy down to B100
Select B1:B100; copy; use Edit | Paste Special specifying Values
Your formulas are now values ( 0 or 1)
Sort ascending A1:B100 using B as the only key
Delete all the entries where B = 1
Best wiishes



--
www.stfx.ca/people/bliengme


"Legend" wrote:

If I have the following data:

1
1
1
2
2
2
3
3
3
1
1
1
2
2
2

How will I get the following output?

1
2
3
1
2

instead of what excel is giving me?

1
2
3

Someone please advice...


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Duplicate Values

Thank you so much... That worked :)

On Oct 16, 8:16 pm, Bernard Liengme
wrote:
Let's say you data is in A1:A100
In B1 entrer 0
In B2 enter =IF(A2=A1,1,0)
Copy down to B100
Select B1:B100; copy; use Edit | Paste Special specifying Values
Your formulas are now values ( 0 or 1)
Sort ascending A1:B100 using B as the only key
Delete all the entries where B = 1
Best wiishes

--www.stfx.ca/people/bliengme

"Legend" wrote:
If I have the following data:


1
1
1
2
2
2
3
3
3
1
1
1
2
2
2


How will I get the following output?


1
2
3
1
2


instead of what excel is giving me?


1
2
3


Someone please advice...



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Duplicate Values

Set up a loop increment LineNo. Delete and shift cells up.

If DataA2 = DataA1 Then
Range("A" & LineNo + 1).Select 'Select & delete cell Data2
Selection.ClearContents
Selection.Delete Shift:=xlUp
End If


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DUPLICATE VALUES adeel via OfficeKB.com Excel Discussion (Misc queries) 2 July 11th 07 09:54 AM
Why does this code remove Duplicate Values, by showing only 1, but it does NOT show Unique values for some reason ? Corey Excel Programming 4 February 23rd 07 02:00 AM
DUPLICATE VALUES Saintsman Excel Worksheet Functions 2 October 12th 05 05:21 PM
Duplicate values Louise Excel Worksheet Functions 6 April 15th 05 03:39 PM
Sum of Duplicate Values Wynn Excel Worksheet Functions 1 November 13th 04 02:36 AM


All times are GMT +1. The time now is 03:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"