Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2006

Tip: Looking for answers? Try searching our database.

advanced filter question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K7 - 08 Jun 2006 22:46 GMT
Hello all again,

I've got some data in column A, sheet3 and I have the following code (that
works without problem)

Sub FilterUniqueItems()

Dim i As Integer
Dim list As Variant
Dim DataRange As Range

Set DataRange = Worksheets("sheet3").Range("A1:A10")

list = DataRange.AdvancedFilter(Action:=xlFilterCopy,
Copytorange:=Worksheets("sheet3").Range("B1"), Unique:=True)

End Sub

Is it possible to determine (programatically, I mean) how many and what
values the advancedfilter extract? I'd like to treat the data before pasting
it into Excel.

Best regards.
Dave Peterson - 08 Jun 2006 23:02 GMT
After the filtered data is in column B, you could use:

with worksheets("sheet3")
 msgbox .range("b2",.cells(.rows.count,"B").end(xlup)).cells.count
 'or since you plopped the data into row 1
 msgbox .cells("B1").end(xldown).row - 1
end with

> Hello all again,
>
[quoted text clipped - 19 lines]
>
> Best regards.

Signature

Dave Peterson

K7 - 09 Jun 2006 15:24 GMT
Thanks a lot Dave!!!

Best regards

> After the filtered data is in column B, you could use:
>
[quoted text clipped - 29 lines]
>>
>> Best regards.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.