PC Review


Reply
Thread Tools Rate Thread

How copy Criteriarange from uatofilter colun to another sheet?

 
 
=?Utf-8?B?VmFsZXJ5?=
Guest
Posts: n/a
 
      9th Oct 2007
Hello!
I trying to copy CriteriaRange to another sheet but i see error in me code
My code is

AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Worksheet(2).Range("E:E"), Unique:=true
How to copy Criteriarange to another list but so that not turn off
autofilter in main sheet.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmFsZXJ5?=
Guest
Posts: n/a
 
      9th Oct 2007
Example file: http://aljany.com/My_Book_sample2.xls
Question: http://aljany.com/Criterias_list.jpg

"Valery" wrote:

> Hello!
> I trying to copy CriteriaRange to another sheet but i see error in me code
> My code is
>
> AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
> Worksheet(2).Range("E:E"), Unique:=true
> How to copy Criteriarange to another list but so that not turn off
> autofilter in main sheet.

 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      9th Oct 2007
Do you mean something like this?:

Sub uniques_from_E()
'
' 09/10/2007 by Pete Ashurst
'
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets.Add
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
ActiveCell.Range("A1:A" & _
Cells(Rows.Count, "A").End(xlUp).Row).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange _
:=ActiveCell.Offset(0, 2).Range("A1"), Unique:=True
Columns("A:B").Delete Shift:=xlToLeft
Range("A1").Select
End Sub

It will give you the list of unique values from column E of the
current sheet (assume heading is on row2, as per your example) and
sorted.

It does not include the choices "All", "Top 10", "Custom ..." which
the Autofilter pull-down shows at the top, nor "Blanks" or "Non-
blanks" shown at the bottom.

Hope this helps.

Pete

On Oct 9, 8:45 am, Valery <Val...@discussions.microsoft.com> wrote:
> Hello!
> I trying to copy CriteriaRange to another sheet but i see error in me code
> My code is
>
> AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
> Worksheet(2).Range("E:E"), Unique:=true
> How to copy Criteriarange to another list but so that not turn off
> autofilter in main sheet.



 
Reply With Quote
 
=?Utf-8?B?VmFsZXJ5?=
Guest
Posts: n/a
 
      9th Oct 2007
Hello Pite_UK
Thank you for code.
I tried insert your function in my example file
http://aljany.com/My_Book_sample2.xls
but this not work there
Pite_UK tell me please How correctly insert your function in my file
http://aljany.com/My_Book_sample2.xls
Because dosn't work and i see error
Can you'll be edit my file ? And give me link to them?
Thank you for you time Pite_UK

"Pete_UK" wrote:

> Do you mean something like this?:
>
> Sub uniques_from_E()
> '
> ' 09/10/2007 by Pete Ashurst
> '
> Range("E2").Select
> Range(Selection, Selection.End(xlDown)).Copy
> Sheets.Add
> ActiveSheet.Paste
> Application.CutCopyMode = False
> Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, _
> Header:=xlYes, OrderCustom:=1, _
> MatchCase:=False, Orientation:=xlTopToBottom
> ActiveCell.Range("A1:A" & _
> Cells(Rows.Count, "A").End(xlUp).Row).AdvancedFilter _
> Action:=xlFilterCopy, CopyToRange _
> :=ActiveCell.Offset(0, 2).Range("A1"), Unique:=True
> Columns("A:B").Delete Shift:=xlToLeft
> Range("A1").Select
> End Sub
>
> It will give you the list of unique values from column E of the
> current sheet (assume heading is on row2, as per your example) and
> sorted.
>
> It does not include the choices "All", "Top 10", "Custom ..." which
> the Autofilter pull-down shows at the top, nor "Blanks" or "Non-
> blanks" shown at the bottom.
>
> Hope this helps.
>
> Pete
>
> On Oct 9, 8:45 am, Valery <Val...@discussions.microsoft.com> wrote:
> > Hello!
> > I trying to copy CriteriaRange to another sheet but i see error in me code
> > My code is
> >
> > AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
> > Worksheet(2).Range("E:E"), Unique:=true
> > How to copy Criteriarange to another list but so that not turn off
> > autofilter in main sheet.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?VmFsZXJ5?=
Guest
Posts: n/a
 
      9th Oct 2007
Hello Pite_UK
Thank you for code.
I tried insert your function in my example file
http://aljany.com/My_Book_sample2.xls
but this not work there
Pite_UK tell me please How correctly insert your function in my file
http://aljany.com/My_Book_sample2.xls
Because dosn't work and i see error
http://aljany.com/error.jpg
Can you'll be edit my file ? And give me link to them?
Thank you for you time Pite_UK

"Pete_UK" wrote:

> Do you mean something like this?:
>
> Sub uniques_from_E()
> '
> ' 09/10/2007 by Pete Ashurst
> '
> Range("E2").Select
> Range(Selection, Selection.End(xlDown)).Copy
> Sheets.Add
> ActiveSheet.Paste
> Application.CutCopyMode = False
> Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, _
> Header:=xlYes, OrderCustom:=1, _
> MatchCase:=False, Orientation:=xlTopToBottom
> ActiveCell.Range("A1:A" & _
> Cells(Rows.Count, "A").End(xlUp).Row).AdvancedFilter _
> Action:=xlFilterCopy, CopyToRange _
> :=ActiveCell.Offset(0, 2).Range("A1"), Unique:=True
> Columns("A:B").Delete Shift:=xlToLeft
> Range("A1").Select
> End Sub
>
> It will give you the list of unique values from column E of the
> current sheet (assume heading is on row2, as per your example) and
> sorted.
>
> It does not include the choices "All", "Top 10", "Custom ..." which
> the Autofilter pull-down shows at the top, nor "Blanks" or "Non-
> blanks" shown at the bottom.
>
> Hope this helps.
>
> Pete
>
> On Oct 9, 8:45 am, Valery <Val...@discussions.microsoft.com> wrote:
> > Hello!
> > I trying to copy CriteriaRange to another sheet but i see error in me code
> > My code is
> >
> > AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
> > Worksheet(2).Range("E:E"), Unique:=true
> > How to copy Criteriarange to another list but so that not turn off
> > autofilter in main sheet.

>
>
>

 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      9th Oct 2007
Just copy/paste it into a standard module - there's nothing special
about it. The sheet where your data is stored should be selected when
you run the code.

Hope this helps.

Pete

On Oct 9, 1:37 pm, Valery <Val...@discussions.microsoft.com> wrote:
> Hello Pite_UK
> Thank you for code.
> I tried insert your function in my example filehttp://aljany.com/My_Book_sample2.xls
> but this not work there
> Pite_UK tell me please How correctly insert your function in my filehttp://aljany.com/My_Book_sample2.xls
> Because dosn't work and i see error http://aljany.com/error.jpg
> Can you'll be edit my file ? And give me link to them?
> Thank you for you time Pite_UK
>
>
>
> "Pete_UK" wrote:
> > Do you mean something like this?:

>
> > Sub uniques_from_E()
> > '
> > ' 09/10/2007 by Pete Ashurst
> > '
> > Range("E2").Select
> > Range(Selection, Selection.End(xlDown)).Copy
> > Sheets.Add
> > ActiveSheet.Paste
> > Application.CutCopyMode = False
> > Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, _
> > Header:=xlYes, OrderCustom:=1, _
> > MatchCase:=False, Orientation:=xlTopToBottom
> > ActiveCell.Range("A1:A" & _
> > Cells(Rows.Count, "A").End(xlUp).Row).AdvancedFilter _
> > Action:=xlFilterCopy, CopyToRange _
> > :=ActiveCell.Offset(0, 2).Range("A1"), Unique:=True
> > Columns("A:B").Delete Shift:=xlToLeft
> > Range("A1").Select
> > End Sub

>
> > It will give you the list of unique values from column E of the
> > current sheet (assume heading is on row2, as per your example) and
> > sorted.

>
> > It does not include the choices "All", "Top 10", "Custom ..." which
> > the Autofilter pull-down shows at the top, nor "Blanks" or "Non-
> > blanks" shown at the bottom.

>
> > Hope this helps.

>
> > Pete

>
> > On Oct 9, 8:45 am, Valery <Val...@discussions.microsoft.com> wrote:
> > > Hello!
> > > I trying to copy CriteriaRange to another sheet but i see error in me code
> > > My code is

>
> > > AutoFilter(2).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
> > > Worksheet(2).Range("E:E"), Unique:=true
> > > How to copy Criteriarange to another list but so that not turn off
> > > autofilter in main sheet.- Hide quoted text -

>
> - Show quoted text -



 
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
criteriarange not equal to webels Microsoft Excel Programming 4 23rd Jun 2011 10:53 AM
GridView Colun which is not visible is not rendered =?Utf-8?B?Qw==?= Microsoft ASP .NET 1 3rd Oct 2007 01:07 PM
Showing sum of a colun in an oulook view zrod Microsoft Outlook 1 18th Nov 2005 12:58 PM
Keep Colun Width The Same SimonJester@moose-mail.com Microsoft Excel Discussion 3 12th Mar 2005 06:29 AM
how do I put a a sequence number into colun A automatically witho. =?Utf-8?B?Q3VzdG9kaW8gQmVybmFyZGVz?= Microsoft Excel Misc 2 2nd Jan 2005 11:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 AM.