View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default delete all rows except

I believe you wanted to use And instead of Or for the operator. By using
Or, if one is true then the entire If statement = true and it will delete.
So if you have Apples in one it would nor met the criteria, but the absence
of Oranges would would meet the criteria, so it would delete.
Using And would require that both Apples and Oranges be absent before it
deletes.


"J.W. Aldridge" wrote in message
...
...unfortnately, this one didn't work.

it deleted all of the rows (although the criteria was met) and left no
rows existing.

I went back and ran the original code and it filtered and deleted it
correctly (but only one criteria of course).

any suggestions?