+ Reply to Thread
Results 1 to 6 of 6

How to delete the even rows?

  1. #1
    Ìì·½
    Guest

    How to delete the even rows?

    I am a newbie.

    I am not familiar with the VBA

    Any one can tell me how to do that?



  2. #2
    impslayer
    Guest

    Re: How to delete the even rows?


    =CC=EC=B7=BD wrote:

    > I am a newbie.
    >
    > I am not familiar with the VBA
    >
    > Any one can tell me how to do that?


    Hi,

    Not sure how you access this newsgroup, but if you have access to
    Google (www.google.com) you can search this (and other) usenet groups
    very easily... You can for example put "delete even rows" in the search
    box for this group (try
    http://groups.google.com/group/micro...el.programming to
    get to this group first) and you will get a couple of hits right away.

    Try this approach first, then if you can't find the answer to your
    question write another post here and I'm sure you will get plentiful
    help!

    Regards,

    /impslayer, aka Birger Johansson


  3. #3
    Norman Jones
    Guest

    Re: How to delete the even rows?

    Hi 天方,

    > I am not familiar with the VBA


    For a non-programmatic solution, in the first cell of a helper column insert
    the formula:

    =ISODD(ROW())

    Drag this formula down as far as required.
    Autofilter the helper column using FALSE as the filter criterion
    Delete the filtered even rows.

    If you want a re-usable programmatic solution, turn on the macro recorder
    and then run the above manual procedure. This will provide base code which
    can be adapted for general application.

    If you require assistance with such adaptation, post back.

    ---

    Regards,
    Norman



    "天方" <[email protected]> wrote in message
    news:eb%[email protected]...
    >I am a newbie.
    >
    > I am not familiar with the VBA
    >
    > Any one can tell me how to do that?
    >
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: How to delete the even rows?

    in an empty column, (assume F), in F1 put the formula
    =mod(row(),2)

    then drag fill down the column for as far as you have data.

    Now select the column and do Data=>Filter=>Autofilter

    in the dropdown that appears in F1, select 0

    Now only the even rows will be visible. Click on F2, then hold down the
    shift key and click on the last visible row that you want deleted

    then do Edit=>Delete and select entirerow. Then do Data=>Filter=>Autofilter
    (to turn off the filter) and the even rows should be gone

    --
    regards,
    Tom Ogilvy


    "天方" <[email protected]> wrote in message
    news:eb%[email protected]...
    > I am a newbie.
    >
    > I am not familiar with the VBA
    >
    > Any one can tell me how to do that?
    >
    >




  5. #5
    Norman Jones
    Guest

    Re: How to delete the even rows?

    Hi 天方,

    A possible downside to my suggestion, but not to Tom's solution, is that it
    requires that the Analysis ToolPak be installed.

    It is preferable, and much simpler, therefore, to use the natively available
    Mod function!


    ---
    Regards,
    Norman



    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi 天方,
    >
    >> I am not familiar with the VBA

    >
    > For a non-programmatic solution, in the first cell of a helper column
    > insert the formula:
    >
    > =ISODD(ROW())
    >
    > Drag this formula down as far as required.
    > Autofilter the helper column using FALSE as the filter criterion
    > Delete the filtered even rows.
    >
    > If you want a re-usable programmatic solution, turn on the macro recorder
    > and then run the above manual procedure. This will provide base code which
    > can be adapted for general application.
    >
    > If you require assistance with such adaptation, post back.
    >
    > ---
    >
    > Regards,
    > Norman
    >
    >
    >
    > "天方" <[email protected]> wrote in message
    > news:eb%[email protected]...
    >>I am a newbie.
    >>
    >> I am not familiar with the VBA
    >>
    >> Any one can tell me how to do that?
    >>
    >>

    >
    >




  6. #6
    Ìì·½
    Guest

    Re: How to delete the even rows?

    Thank you all

    I am very appreciated that you provided so many ways.

    The problem has solved

    Thanks a lot



+ 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