+ Reply to Thread
Results 1 to 15 of 15

delete specific rows in excel sheet3

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    delete specific rows in excel sheet3

    In my search I am not sure how long the list will go. Can you please help me with such a circumstance to modify the code?
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: delete specific rows in excel sheet3

    Hi,
    Could you expalin exactly what you want help with as it is not clear?
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    If I am reading it correctly try the code below on a copy of your data
    Please Login or Register  to view this content.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  4. #4
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    Yes it's the problem WasWodge. You understood it well.

    The above code only deletes the first row (which I want to keep and delete the rest others) but rest others remains same as it is.

    Thanks in advance.

  5. #5
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    Also the next targeted row becomes 50 which I want to delete. and so on as the rows will slip.

  6. #6
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    The above code only deletes the first row
    I am a bit puzzled here. On my data it deletes rows
    1
    51
    101
    151
    201
    251
    301
    351
    401
    451
    501
    et cetera

    The above code only deletes the first row (which I want to keep and delete the rest others)
    Your original post deletes the first row
    Please Login or Register  to view this content.
    Run the code below. What lines have an "a" in column A and which rows do you want to delete (list the first 5 rows to delete from the original data)?
    Please Login or Register  to view this content.
    Last edited by WasWodge; 03-10-2013 at 05:32 PM.

  7. #7
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    Rows with a: 1, 51, 101, 151, 201, 251 and so on.
    I need to delete rows: 52, 103, 154, 205, 256

  8. #8
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    Rows with a: 1, 51, 101, 151, 201, 251 and so on.
    I need to delete rows: 52, 103, 154, 205, 256 and so on.

  9. #9
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    Deleted rushed editing
    Last edited by WasWodge; 03-10-2013 at 05:47 PM.

  10. #10
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    See last post as your last post has registered but not mine

  11. #11
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    The code did not ran.

  12. #12
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    My fault

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    Worked. Thanks a lot.

  14. #14
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: delete specific rows in excel sheet3

    Happy we got there. Remember to mark the thread as solved if you feel your question has been answered.

  15. #15
    Registered User
    Join Date
    09-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: delete specific rows in excel sheet3

    I am really happy too. Marked solved. It wont be possible with out your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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