+ Reply to Thread
Results 1 to 4 of 4

Autofilter range criteria filter only last cell value in range

  1. #1
    Registered User
    Join Date
    04-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    23

    Autofilter range criteria filter only last cell value in range

    Hi,

    Below code filter only for last cell value in range

    Sub AutofilterbyRange()

    Dim rng As Range
    Dim rngfilter As Range
    Set rng = Application.Range("f1:f4")
    Set rngfilter = Range("a1").CurrentRegion

    rngfilter.AutoFilter field:=1, Criteria1:=rng

    End Sub

    what i need is code should fiter for all cell values in range

    Thanks

    SAGAR

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Autofilter range criteria filter only last cell value in range

    Hi, SAGAR ,

    could you please attach a workbook to clarify your problem? Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    And please add Code-Tags around the procedure as requested per Rule#3

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    04-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Autofilter range criteria filter only last cell value in range

    Hi Holger,

    thanks for the time you spend on this thread.

    In criteria, Application.Transpose (array or Range("x").value) need to use

    Please Login or Register  to view this content.
    Sagar
    Last edited by SAGAR KHOLLAM; 04-01-2013 at 08:14 AM.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Autofilter range criteria filter only last cell value in range

    Hi, Sagar,

    maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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