Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 24 of 24

Thread: Row deletion..!! Reverse case...

  1. #21
    Thanks for all your support.. Good day..

  2. #22

    Arrow plz look into it

    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..
    Attached Files Attached Files

  3. #23
    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

  4. #24
    Haan...You are right..!! Thanks..Now new code works...
    Good day boss...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •