+ Reply to Thread
Results 1 to 2 of 2

AdvancedFilter Sub

  1. #1
    Registered User
    Join Date
    03-08-2010
    Location
    Montana
    MS-Off Ver
    Excel 2003
    Posts
    9

    AdvancedFilter Sub

    Trying to use an Advanced Filter Sub: xlFilterCopy to select a set data according to a begining and ending date in a sheet. I am getting a argument not optional error.

    Code:

    Sub Sortbydate()
    Range("A2:E500").advancedfilter
    Action = xlFilterCopy
    CriteriRange = Range("J4:K4")
    Range("N2").Select
    ActiveSheet.Paste
    Range("Q29").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "=SUM(R[-27]C:R[-1]C)"
    Range("R29").Select
    ActiveCell.FormulaR1C1 = "=SUM(R[-27]C:R[-1]C)"
    Range("R30").Select
    End Sub

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: AdvancedFilter Sub

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ 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