+ Reply to Thread
Results 1 to 4 of 4

Thread: How to delete multiple rows on excel where the number in the first column is the same

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    How to delete multiple rows on excel where the number in the first column is the same

    Hi, please see the attached image; I want to be able to delete on my excel file all the rows that contain that information, but i can't figure this out. Please Help, if is with a macro can someone provide me the code to do it? Thanks By the way im using version 2007
    Attached Images Attached Images

  2. #2
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,398

    Re: How to delete multiple rows on excel where the number in the first column is the

    Hi webuxer,

    Which kind of information in a row will make that row eligible for deletion.. is it "Delivery Charge"in column F?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +919810929744
    dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    09-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: How to delete multiple rows on excel where the number in the first column is the

    Hi, it will be the "3785" number but the "Delivery charge in column F will also work.
    Thanks

  4. #4
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,398

    Re: How to delete multiple rows on excel where the number in the first column is the

    Hi Webuxer,

    You can use following code to delete any row which has 3785 written anywhere :-

    Sub del()
    Cells(1, 1).Select
    ActiveCell.EntireRow.Select
    While ActiveCell.Value <> ""
        If Application.WorksheetFunction.CountIf(Selection, 3785) > 0 Then
        Selection.EntireRow.Delete
        Else
        Selection.Offset(1, 0).Select
        End If
    Wend
    End Sub
    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +919810929744
    dilipandey@gmail.com

+ 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.2.0