+ Reply to Thread
Results 1 to 6 of 6

filter by deselecting a value

  1. #1
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    filter by deselecting a value

    Hi Champs,,

    I have to filter a range by deselecting a value, say "100"

    i used the below code..

    Range("rng1").AutoFilter Field:=1, Criteria1:="<>100", Operator:=xlAnd


    but it doesnot worked. please help me

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: filter by deselecting a value

    What is "rng1" ?

    It can't be a named range, as it refers to a single cell.

    Is it a range variable? In which case, your code should be:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: filter by deselecting a value

    it doesnot work

    my entire code is below

    Dim rng1 As Range
    Set rng1 = Application.ActiveSheet.UsedRange
    rng1.AutoFilter Field:=1, Criteria1:="<>009"...

    i have 009 value in many cells.

    pls help.

  4. #4
    Registered User
    Join Date
    12-12-2014
    Location
    PL
    MS-Off Ver
    2010
    Posts
    55

    Re: filter by deselecting a value

    Try this:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: filter by deselecting a value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

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

    View Pic

  6. #6
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: filter by deselecting a value

    yes it worked.. got through record macro. thanks anyway.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Deselecting a Chart
    By PosseJohn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 02:56 PM
  2. Deselecting a Chart
    By PosseJohn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2010, 01:49 AM
  3. Deselecting problem
    By jalapeno in forum Excel General
    Replies: 2
    Last Post: 12-09-2006, 02:07 AM
  4. Deselecting Worksheets
    By Sloth in forum Excel General
    Replies: 1
    Last Post: 10-26-2005, 05:05 PM
  5. deselecting...
    By cellardoor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2005, 05:05 PM

Tags for this Thread

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