This code take column index and condition for deleting the entire row.
Due to my limited exposure to VBA I am unable to figure out why this is not working.
Please suggest.
Govind
Please Login or Register to view this content.
This code take column index and condition for deleting the entire row.
Due to my limited exposure to VBA I am unable to figure out why this is not working.
Please suggest.
Govind
Please Login or Register to view this content.
Forget the code for a moment, can you tell us:
1) what your condition for deletion is?
2) what column your checking?
3) where in the column you are starting (looks like row 2)
4) what determines when to stop (empty cell in that column?)
5) is there additional data in that column further down or does the last cell with data in that column tend to represent the bottom of the data on that sheet?
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Or, just give this alternate version a try:
Please Login or Register to view this content.
hi,
I have tried your code.. its seeems to be not working as well..
Please see the attached file.. i am trying to remove second row with value 2
Govind
See, it always pays to start with a worksheet. The question is: "Are you always filtering by a numeric string?"
The culprit is this line of code:
..which I used directly from your original formula. TYPE 2 is "string" or text. The number "2" as a filter criteria isn't accurate enough.Please Login or Register to view this content.
Change that to TYPE:=1 for "numeric" and it works fine FOR NUMBERS only.
If you want a permanent solution that works for anything (numerics or text strings as a filter), then use BOTH like so:
This will spot numbers as numbers and only match to numbers, spot text strings as text and treat them likewise.Please Login or Register to view this content.
Last edited by JBeaucaire; 05-02-2009 at 07:41 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks