+ Reply to Thread
Results 1 to 4 of 4

Mr. "Iamthe Best" needs your help !!! How to delete a set of rows

  1. #1
    Registered User
    Join Date
    05-01-2007
    Posts
    3

    How to delete a set of rows

    Hello,

    I have a set of rows from a total 20000 rows, which have some strings.
    The entire worksheet consists of five colums of numbers. I am trying to delete these rows by using some formula that could be dragged down a column. Lets say I have this :

    123 1444 155 5151
    121 1212 141 1515
    string
    123 1444 155 5151
    121 1212 141 1515
    string
    123 1444 155 5151
    121 1212 141 1515

    So, I just want to delete the rows with strings by dragging a formula on the last column that does exactly that. Could anyone show me how to do this by any method whasoever. Thanks.
    Last edited by Iamthe best; 05-03-2007 at 10:57 AM. Reason: illegal threat tile

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Please read forum rules - see links below

    Your thread title is invalid.

    Formulas can not delete rows but they can assist you to delete rows

    Try this
    In a blank column enter this formula
    =IF(ISNUMBER(A1),"","String")
    Change A1 as required

    If Row 1 does not have column headers insert a new row 1, Add column headers.

    once columns have headers
    Select row 1
    from the Data Menu >
    select Filter >
    Autofilter >
    Select Dropdown arrow for column that has formula > Select String
    Select displayed rows & Delete
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445
    Hi,

    Copy this code. In excel press ALT&F11 then F7. Paste the code. Close the window.

    Please Login or Register  to view this content.
    In excel go to Tools > Macro > Run Macro > Delrows > OK
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Iamthe best
    Hello,

    I have a set of rows from a total 20000 rows, which have some strings.
    The entire worksheet consists of five colums of numbers. I am trying to delete these rows by using some formula that could be dragged down a column. Lets say I have this :

    123 1444 155 5151
    121 1212 141 1515
    string
    123 1444 155 5151
    121 1212 141 1515
    string
    123 1444 155 5151
    121 1212 141 1515

    So, I just want to delete the rows with strings by dragging a formula on the last column that does exactly that. Could anyone show me how to do this by any method whasoever. Thanks.
    You can do it without the need of formula. (better is to copy your data to other sheet before doing the following)

    I suppose that you mean any text entered where you have shown word "string"
    Select the column or columns (if you have strings in more columns).
    press Ctrl+H
    in Replace what enter 'a' (without quotes) and press Replace All.
    then enter 'b' and press Replace All
    and so on for all 26 characters of English. (don't worry it will take less than a minute.) all strings will be removed and blank cells appear in place of strings.
    Now to remove blanks cells, select col A
    press F5 then Special button and select Blanks.
    then right click on any selected cell, right click > Delete > Entire row then press Ok.

    hope this would help.

+ 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