Thanks for all your support.. Good day..
Thanks for all your support.. Good day..
Hi...Plz chk the attached file.I have modified ur code slightly for 4 criteria's to update the things in 2nd sheet.
As per my understanding on this code, it must not delete any rows from 2nd sheet.
Because, 'PP' is available in all cells of D:'D,16 is available in all cells of C:C
in Q:Q either cells have '1' or are blanks and in R:R either cells have 'MP' or are blanks.
So overall it must not delete any(Msg box must pop up)..Am I right..? But when u run the program, it does and only 4 rows are left along with header..
Plz check the code where I have done mistake in modifying it.
Thanks for ur help.Plz post the new code..
the reason the code fails is that cells in column Q are not empty (i did not check other columns), they have character count of 1, presumably a space
try changing code to
If InStr(1, cel.Offset(, 16), e, vbTextCompare) > 0 Or Len(Trim(cel.Offset(, 16))) = 0 Then
Haan...You are right..!! Thanks..Now new code works...
Good day boss...