J
John Keith
The following commands make a part of macro I'm trying to complete
Selection.AutoFilter Field:=24, Criteria1:="="
Rows("10:1186").Select
Selection.Delete Shift:=xlUp
The first line specifies an autofilter and a criteria that generates
an output typical of the autofilter function.
This next two commands selects and deletes all the rows (and then some
for good measure, hence the 1186) that need to be deleted. These lines
were generated during a "record macro", hence the explicit 10:1186.
Now it is expected that the starting row to delete will not always be
row 10 due to the variability of the content of the rows before the
filter is applied (well duh!)
So, my question is, how is the filter output more generically selected
so that all any rows from the filter output result will be deleted?
Thanks for any suggestions!
John Keith
(e-mail address removed)
Selection.AutoFilter Field:=24, Criteria1:="="
Rows("10:1186").Select
Selection.Delete Shift:=xlUp
The first line specifies an autofilter and a criteria that generates
an output typical of the autofilter function.
This next two commands selects and deletes all the rows (and then some
for good measure, hence the 1186) that need to be deleted. These lines
were generated during a "record macro", hence the explicit 10:1186.
Now it is expected that the starting row to delete will not always be
row 10 due to the variability of the content of the rows before the
filter is applied (well duh!)
So, my question is, how is the filter output more generically selected
so that all any rows from the filter output result will be deleted?
Thanks for any suggestions!
John Keith
(e-mail address removed)