OK I have found a few tips around and I can at least define exactly what I
want to do now, sorry if the first post was not clear.
I have a column M with data starting definately at row10 and ending in a
preset row called EndRow.
This column can contain say R,C,F,L,T,U or similar repeating strings.
Now what I need to do is have a macro that will effectively start at row 10,
look up the string in column M and if say the contents of the cell in column
M is not = R then delete entire row.
The reason I need a negative of the matched string is thats the easiest way
to keep what i want and discard the rest.
Sort of
Worksheet=Sheet2 (or could be sheet 1 or 3 or whatever it is named)
start at row 10, end at row (EndRow) where EndRow variable is user defined
If Cell at M (Current row) = Not R then Select and delete row
else go to CurrentRow+1
Keep going until EnRow= set value)
End
Unfortunately my coding skills are REALLY bad and any help to translate this
into a macro would be appreciated.
BR, John
JE McGimpsey - 30 Sep 2007 14:28 GMT
> The reason I need a negative of the matched string is thats the easiest way
> to keep what i want and discard the rest.
An easier way might be to do an advanced filter to a new worksheet:
http://www.contextures.com/xladvfilter01.html