+ Reply to Thread
Results 1 to 4 of 4

How to filter from 0601 to 0622 use a easy method?

  1. #1
    Forum Contributor
    Join Date
    08-01-2016
    Location
    China, beijing
    MS-Off Ver
    2016
    Posts
    114

    How to filter from 0601 to 0622 use a easy method?

    for example I want to get the data from 0601 to 0622, I don't want to check the checkbox for 23 times. Can I just use a "0601~0622" like formula will do? 0412124953.png

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: How to filter from 0601 to 0622 use a easy method?

    What kind of data is in this column -- numbers or text? If they are numbers, I could see using the "between" option under the "number filters" to show records where this column is between 601 and 622.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    03-20-2014
    Location
    HYEDERABAD
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to filter from 0601 to 0622 use a easy method?

    TRY THIS...JUST CHECK IT...
    Sub tkt()
    Dim cot As Integer
    Dim pot As Integer
    Dim G As Variant
    Dim I As Integer
    Dim VARY As String
    cot = 601 'next time you can give input box..cot=inputbox("")
    pot = 21 'next time you can give input box..pot=inputbox("")
    For I = 0 To pot
    VARY = VARY & cot + I
    VARY = VARY & """" & ", " & """"
    Next I
    K = Len(VARY) - 4
    G = Left(VARY, K)

    Range("A1").Select

    Selection.AutoFilter
    ActiveSheet.Range("$A$1:$A$40").AutoFilter Field:=1, Criteria1:=Array(G), Operator:=xlFilterValues

    End Sub
    Last edited by mdilyas_865; 04-12-2017 at 04:33 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: How to filter from 0601 to 0622 use a easy method?

    If the data is in number format then select
    number filter --> Between --> Then put upper value and lower value in the respective fields.
    If the data is in Text format then you need to insert another helper column to get the value from that column. For that write the below formula in new column :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Here $A2 is the first cell of the column you want to filter. Say, the new column is B, then place the above formula in cell B2 and copy down.
    Now do the number filter as above in new column.

+ 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. Easy filter and select quotation
    By ronettes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-27-2017, 12:02 PM
  2. Easy Method to update the revised VBA modules in Excel 2013
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2014, 05:49 AM
  3. Looking for an easy method to organizing my data
    By Tjbaer in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-18-2009, 02:11 PM
  4. Easy cell address (or filter?) question
    By fern in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-16-2007, 10:30 AM
  5. Easy Filter
    By CBrausa in forum Excel General
    Replies: 3
    Last Post: 03-07-2006, 03:15 PM
  6. [SOLVED] An easy one: Help with some VB funct about list and filter
    By filo666 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-30-2005, 08:50 PM
  7. Very easy question about filter!!!
    By Wilmarjr in forum Excel General
    Replies: 2
    Last Post: 06-27-2005, 02:05 PM

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