Question about my code for vba autofilter

dimitrisko

New Member
Joined
Aug 15, 2017
Messages
15
Code:
Sub Anazitisi_apodosi()


Sheets("ÐÑÏÃÑÁÌÌÁ").Range("AB15:AB1000").AutoFilter , Field:=28, Criteria1:=">Sheet2.Range('A7').Value", Operator:=xlAnd, Criteria2:=<sheet2.range('b7').value"

End Sub

I want to autofilter within a range of numbers that are stored in two cells. I Dont want to be always the same numbers that i write in vba. Is that possible?</sheet2.range('b7').value"
 
Last edited by a moderator:
You can't upload a file to the site, but you can upload to a share site such as OneDrive, DropBox & then post a link here
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Thanks for the file.
The problem is that the numbers are not numbers.
 
Upvote 0
First off, in a blank cell enter this formula
=ISNUMBER(H16)
What does it say? then change the formula to look at A7 & what does that say?
 
Upvote 0
That file works for me once you have corrected the sheet name & removed the , from in front of Field
 
Upvote 0
Code:
Sub Anazitisi_apodosi()
Sheets("ÐÑÏÃÑÁÌÌÁ").AutoFilterMode = False
Sheets("ÐÑÏÃÑÁÌÌÁ").Range("AB14:ab150").AutoFilter field:=1, Criteria1:=">=" & Sheets("ÐÑÏÃÑÁÌÌÁ").Range("A7").Value, Operator:=xlAnd, Criteria2:="<=" & Sheets("ÐÑÏÃÑÁÌÌÁ").Range("b7").Value
End Sub
So i rewrite the code like this. Again same problem. I removed , infront of field and same again
https://drive.google.com/open?id=1KEDFJ0sfU5aiV-SATL2SCFQuIIXonEdm
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,229
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top