+ Reply to Thread
Results 1 to 5 of 5

Delete whole if the cell ends with something

  1. #1
    Registered User
    Join Date
    07-19-2009
    Location
    toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Delete whole if the cell ends with something

    I am trying to create a function or a macro to Delete whole if the cell ends with something ( for example , it ends with @com)

    any ideas

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Delete whole if the cell ends with something

    Are you looking to loop through a range of cells? In a column? In a row? When deleting the cells, do you want the entire row deleted? Just the cell? If just the cell, do you want surrounding cells to shift up or to the left?

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Delete whole if the cell ends with something

    =right(<cell>,4)="@com" evaluates to TRUE where the last four characters of the cell referred to are @com. Copy this in an adjacent column, apply data -> filter -> autofilter, filter the test columns for true and delete your cells or delete their contents as needed.

    CC

  4. #4
    Registered User
    Join Date
    07-19-2009
    Location
    toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Delete whole if the cell ends with something

    I meant deleting the whole row, if the cell on a specific column ends with something , for example "@.com"

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Delete whole if the cell ends with something

    read cheek charlies post it works fine, just select the visible rows using the row numbers and right click delete row
    Last edited by martindwilson; 08-18-2009 at 09:19 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1