Filter for ABS

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
758
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello - Looking for a way within my existing VBA to capture a filter so it filters if something is greater than ABS of lets just say 1. for example i have field 11 with values and i want it to filter by anything equal to or greater than 1. Is the only way to create another column with an ABS Formula in it then filter off of that? i would prefer not to go that route if possible

VBA Code:
If Not ActiveSheet.AutoFilterMode Then ActiveSheet.Range("10:10").AutoFilter

Range("10:10").AutoFilter Field:=3, Criteria1:="<>" & Range("D7")
Range("10:10").AutoFilter Field:=10, Criteria1:="AA", Operator:=xlOr, Criteria2:="BB"
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You can filter between, like
Range("10:10").AutoFilter Field:=1, Criteria1:=">=2", Operator:=xlOr, Criteria2:="<=-2"
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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