How to use an IF THEN formula in VBA code to unhide hidden rows with a specific number in them?

crmau

New Member
Joined
Oct 29, 2015
Messages
19
Hi,

I have a report in Excel with 29 columns that I have filters on. I need to be able to see some of those hidden rows that have been "filtered out", without modifying my original filters, and wanted to know if there is an IF THEN code I can use in VBA to show those rows.

In column N of my report, I have transactions ranging from the negative millions of dollars to positive millions of dollars. I currently have column N filtering out any transactions between -100 and 100, but unfortunately that's taking out a number I do need to see: $0.00 (as odd as that may seem).

So it occurred to me I could do an IF THEN in VBA to make it show all the hidden rows that contain "$0.00" in column N. I've taken other approaches to this problem but all of them mess with the other filters I have in the other columns. I need to leave those other filters untouched!

Here's my code for filtering the -100 to 100 out of the report if it's of any help:

Code:
' Column N: Principal Amount

    ActiveSheet.Range("$A$1:$AC$10000").AutoFilter Field:=14, Criteria1:= _
        ">=100.00", Operator:=xlOr, Criteria2:="<=(100.00)"

Thanks and let me know if you need additional information! I greatly appreciate it.
 

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