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
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
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.
Originally Posted by shg
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.
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: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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks