+ Reply to Thread
Results 1 to 7 of 7

Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    10

    Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    I know the following is clunky, but I cannot figure a better way to do it. Please let me know of any ideas that anyone has to make it more modular and easier on the eyes. Note- I am doing this for many more rows than just this.

    Thank you. Zachary

    Please Login or Register  to view this content.
    Last edited by zfeinstein; 11-08-2013 at 04:39 PM. Reason: code tags

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you today. In the future, please read all the forum rules and observe them.)

    BTW: Unless you are looking to obtain lots of spam, I would suggest you remove your email address from the public viewing in the forum. Click on Edit and erase it.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    May be so,

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    Thank you AB33. That looks real good. But it seems it could be brought down even more?

    Also, thank you to alansidman for correcting me on my forum etiquette.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    One way:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    Thank you very much for all of the valuable help.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help Simplify Very Basic VBA Code to Delete Non-Adjacent Rows in Excel

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If there are more than 2 blank adjacent rows, delete them
    By Jon.R in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2011, 07:39 AM
  2. Simplify Excel VB code
    By odggi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2009, 08:51 AM

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