Forum Discussion
NEED HELP!! If Cell contain specific text then move row to another sheet
Hi Kenneth_Manuel ,
I tried to run some tests with your code and everything seems to be working properly.
The only thing is that you are applying your second IF statement (the code block 'K = K - 1') after deleting the row with "ETA Not Passed" , "Delivery ETA Not Passed" & "Schedule Not Passed". I don't know if this is the intention, but I flag it, as you are applying the K decrement to the row below the keywords.
To try to find a solution, you can debug it "step-by-step", by opening the VBA interface, selecting your method and clicking F8 (and then F8 again for each line of code). This approach will basically run your program line by line, so it will be easy to find any unexpected behavior.
Also, if you prefer, you can send us a small sample of your workbook (you can populate it with fake data), as your particular workbook design may be causing this issue.