+ Reply to Thread
Results 1 to 2 of 2

Autofilter Does not work

  1. #1
    Registered User
    Join Date
    06-07-2010
    Location
    california, us
    MS-Off Ver
    Excel 2003
    Posts
    37

    Autofilter Does not work

    Hello, while trying to Autofilter, I receive an Run- time error '1004'
    : AutoFilter method of Range class failed.

    I googled the error for quite some time for a solution and all I have come up with was to delete the selection criteria, which I already have.

    Please help me find where the problem may be... Thnx


    Private Sub UserForm_Initialize()

    With Sheet1
    BalanceSheet1.Range(.Range("D3"), .Range("D" & .Rows.Count).End(xlUp)) _
    .AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Range("P3"), Unique:=True
    Range("P3").AutoFilter
    Range("P3:P6000").Sort Key1:=Range("P3"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    fClient.List = .Range(.Cells(4, 16), .Cells(.Rows.Count, 16).End(xlUp)).Value
    End With
    Addition.fClient.SetFocus

    With Sheet1
    BalanceSheet1.Range(.Range("G3"), .Range("G" & .Rows.Count).End(xlUp)) _
    .AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Range("R3"), Unique:=True
    Range("R3").AutoFilter
    Range("R3:R6000").Sort Key1:=Range("R3"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    Last1.List = .Range(.Cells(4, 18), .Cells(.Rows.Count, 18).End(xlUp)).Value
    End With

    With Sheet1
    BalanceSheet1.Range(.Range("F3"), .Range("F" & .Rows.Count).End(xlUp)) _
    .AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Range("T3"), Unique:=True
    Range("T3").AutoFilter
    Range("T3:T6000").Sort Key1:=Range("T3"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    First.List = .Range(.Cells(4, 20), .Cells(.Rows.Count, 20).End(xlUp)).Value
    End With


    With Sheet1
    BalanceSheet1.Range(.Range("E3"), .Range("E" & .Rows.Count).End(xlUp)) _
    .AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Range("V3"), Unique:=True
    Range("V3").AutoFilter
    Range("V3:V6000").Sort Key1:=Range("V3"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    Korean.List = .Range(.Cells(4, 22), .Cells(.Rows.Count, 22).End(xlUp)).Value
    End With

    -James
    Last edited by jhc8255; 04-21-2011 at 10:44 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Autofilter Does not work

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Keep it simple....
    Doing this will ensure you get the result you need!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1