VBA Newbie Question

weefatbob

New Member
Joined
Sep 3, 2013
Messages
18
Apologies if this has been asked before, I am new to VBA and have built a filter for my data....
Sub Filterindata()
Range("A1"). Autofilter Field:1,Criteria1:=Array("X*")
End Sub

From this filtered data, I want to delete rows where column H, which is headed line Manager Y/N, where the value is equal to N. I only want I to work on the filtered rows.

Is this possible?

TIA
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Code:
Sub Filterindata()
Range("A1:H1").autofilter 1, "=X*"
Range("A1:H1").autofilter 8, "=N"
ActiveSheet.autofilter.Range.Offset(1).EntireRow.Delete
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,217,022
Messages
6,134,067
Members
449,858
Latest member
mangjuan

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