LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default unique entries code

I tried the following code several times and it didn't
work???


Sub GetUnique()
Dim rng as Range, rng1 as Range
with Worksheets("Sheet2")
set rng = .Range("A1:A1000")
rng.Formula = "=row()"
rng.Formula = rng.Value
rng.offset(0,1).Formula = "=If(countif(Sheet1!A1:Z100,A1)
0,"""",na())"

On error Resume Next
set rng1 = rng.offset(0,1).SpecialCells
(xlFormulas,xlErrors)
On Error goto 0
if not rng1 is nothing then
rng1.EntireRow.Delete
End if
.Columns(2).Delete
End With
End Sub

--
Regards,
Tom Ogilvy



"scrabtree" wrote in
message
...
Hello. I have posted this question a couple times and
haven't got the answer I need yet. Past suggestions have
suggested using advanced filter, but that don't do what I
need.

I have a table in Sheet1 A1:Z100. I need, in Sheet2
Column A:A a list of all the unique values in Sheet1
A1:Z100 that are between the values of 1 and 1,000.

Please help!


 
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
Unique entries jc132568 New Users to Excel 4 September 4th 09 05:02 AM
Unique Entries Kanwaljit Singh Dhunna Excel Worksheet Functions 1 April 22nd 05 02:59 AM
Unique Entries Jason Morin Excel Worksheet Functions 0 April 21st 05 05:41 PM
unique entries scrabtree[_2_] Excel Programming 7 August 1st 04 06:36 PM
Unique Entries John Phinney Excel Programming 3 April 6th 04 03:05 AM


All times are GMT +1. The time now is 12:22 AM.

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

About Us

"It's about Microsoft Excel"