Results 1 to 11 of 11

Thread: Delete Rows

  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Delete Rows

    I posted this as well on Mr Excel, but have not heard back, and am under a time constraint. I would like to delete a row where the contents in the cell(s) in column A contains, among other text/numbers/symbols, the words "Service Requester", "SR Contract", and/or "Total".
    Thanks in advance.

  2. #2
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    New York, New York, USA
    Posts
    266
    Thanks
    0
    Thanked 19 Times in 19 Posts
    Dear jlkirk

    Without using a macro, see the attached example. I used a formula for each search, of course you could make this one long formula if you desire.

    Most important is to make sure the item to be searched is exact. My quick way is to copy a row from the data and edit it down to the needed item.

    In the example I inserted a Col before the data for the reference no.'s therefore the example is searching Col B not Col A

    Hope the attached helps



    Tom D
    Attached Files Attached Files

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by duthiet View Post
    Dear jlkirk

    Without using a macro, see the attached example. I used a formula for each search, of course you could make this one long formula if you desire.

    Most important is to make sure the item to be searched is exact. My quick way is to copy a row from the data and edit it down to the needed item.

    In the example I inserted a Col before the data for the reference no.'s therefore the example is searching Col B not Col A

    Hope the attached helps



    Tom D


    Thanks.

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Duthiet (or anyone else),
    What about the folowing as an alternative? I would then manually all "Yes"s.
    Thanks,
    Jeff

    =IF(OR(IF(ISERROR(FIND("Service Requester",A1,1),IF(ISERROR(FIND("SR Contract",A1,1),IF(ISERROR(FIND("Total",A1,1)),"Ye s","No")))
    Last edited by jlkirk; 2011-11-01 at 17:07.

  5. #5
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    New York, New York, USA
    Posts
    266
    Thanks
    0
    Thanked 19 Times in 19 Posts
    I tired the above formula and it does not work. In addition, Find is case sensitive Search is not, so if the data were to have say (total,TOtal, totaL) Find would result in #VALUE!

    Maybe someone can provide the best all in one formula for you.

    Tom D

  6. #6
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Here's one that will work:
    =IF(AND(ISERROR(FIND("SERVICE REQUESTER",UPPER($C23),1)),ISERROR(FIND("SR CONTRACT",UPPER($C23),1)),ISERROR(FIND("TOTAL",UPP ER($C23),1))),"No","Yes")

    Note: You don't need the internal IF's since ISERROR returns True or False. Use AND in stead of OR to return True when all return an error then reverse the results so the True conditions return NO and the False {matches} return YES. then delete the Yes lines.
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  7. #7
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    I would use:
    =COUNT(SEARCH({"Service Requester","SR Contract","Total"},C23))>0
    Regards,
    Rory

    Microsoft MVP - Excel

  8. #8
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Rory,

    Very NICE!
    But if I may I'd keep the UPPER function to cancel out some typing errors.
    =COUNT(SEARCH({"SERVICE REQUESTER","SR CONTRACT","TOTAL"},UPPER($C23)))>0

    Note to OP: Rory's solution returns TRUE/FALSE vs YES/NO no biggie just FYI.

    Regards,
    Last edited by RetiredGeek; 2011-11-02 at 10:36.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  9. #9
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks guys!

  10. #10
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    You can, but SEARCH is not case-sensitive anyway...
    Regards,
    Rory

    Microsoft MVP - Excel

  11. #11
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Quote Originally Posted by rory View Post
    You can, but SEARCH is not case-sensitive anyway...
    Rory,

    Sorry, I missed that!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

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