PC Review


Reply
Thread Tools Rate Thread

advanced filter question

 
 
K7
Guest
Posts: n/a
 
      8th Jun 2006
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.


 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      8th Jun 2006
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

K7 wrote:
>
> 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
 
Reply With Quote
 
K7
Guest
Posts: n/a
 
      9th Jun 2006
Thanks a lot Dave!!!

Best regards


"Dave Peterson" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> 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
>
> K7 wrote:
>>
>> 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



 
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
Question about Advanced Filter Steven L Microsoft Excel Misc 1 29th May 2008 07:28 PM
Advanced Filter Question =?Utf-8?B?SGF2ZW5zdGFy?= Microsoft Excel Worksheet Functions 3 15th Mar 2006 10:51 PM
Advanced Filter Question =?Utf-8?B?RG9u?= Microsoft Excel Programming 1 14th Feb 2006 09:04 PM
advanced filter question philcud Microsoft Excel Programming 1 16th May 2005 06:52 PM
Advanced Filter Question carl Microsoft Excel Worksheet Functions 1 27th Aug 2004 02:54 PM


Features
 

Advertising
 

Newsgroups
 


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