PC Review


Reply
Thread Tools Rate Thread

Duplicate Values

 
 
Legend
Guest
Posts: n/a
 
      17th Oct 2007
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...

 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmVybmFyZCBMaWVuZ21l?=
Guest
Posts: n/a
 
      17th Oct 2007
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...
>
>

 
Reply With Quote
 
Legend
Guest
Posts: n/a
 
      17th Oct 2007
Thank you so much... That worked

On Oct 16, 8:16 pm, Bernard Liengme <blien...@TRUENORTH.stfx.ca>
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...



 
Reply With Quote
 
Fan924
Guest
Posts: n/a
 
      17th Oct 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate values Mike Microsoft Access Forms 1 23rd Nov 2009 11:01 PM
Why does this code remove Duplicate Values, by showing only 1, but it does NOT show Unique values for some reason ? Corey Microsoft Excel Programming 4 23rd Feb 2007 02:00 AM
non duplicate values baha17@gmail.com Microsoft Excel Programming 1 10th Dec 2006 03:21 AM
Duplicate Values margaret hannah Microsoft Access Forms 1 9th Sep 2004 11:13 PM
Re: Duplicate values Bob Phillips Microsoft Excel Programming 0 20th Jul 2003 04:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:56 PM.