+ Reply to Thread
Results 1 to 2 of 2

Help!!! I have problem deleting 2500 rows of filtered rows

  1. #1
    Registered User
    Join Date
    01-11-2006
    Posts
    15

    Question Help!!! I have problem deleting 2500 rows of filtered rows

    I have total of 156 columns and 3900 rows with 20 columns of formula for each row. My filtered result is 2500 rows. I tried to delete 2500 rows in my excel but it took me more than half an hour to delete it either by vba code or manually by excel. I tried using office clipboard manually, it paste the data as value and my formula isn't there anymore.

    Anybody has any idea how to write a vba program to solve this problem and how to write a office clipboard in vba.


    Please help... anybody...

    DESPERATE FOR THE ANSWER

  2. #2
    Dave Peterson
    Guest

    Re: Help!!! I have problem deleting 2500 rows of filtered rows

    In your code, turn off the calculation, turn off screenupdating, turn off the
    display of page breaks, and turn off pagebreak preview.

    Delete your rows of data

    Turn back the pagebreak preview (if it was set that way), turn screenupdating
    back on and turn calculation back on.

    Kind of:

    Option Explicit
    Sub testme()

    Dim CalcMode As Long
    Dim ViewMode As Long

    Application.ScreenUpdating = False

    CalcMode = Application.Calculation
    Application.Calculation = xlCalculationManual

    ViewMode = ActiveWindow.View
    ActiveWindow.View = xlNormalView

    ActiveSheet.DisplayPageBreaks = False

    'do the work

    'put things back to what they were
    Application.Calculation = CalcMode
    ActiveWindow.View = ViewMode

    End Sub



    shirley_kee wrote:
    >
    > I have total of *156 columns *and *3900 rows *with *20 columns of
    > formula *for each row. My filtered result is 2500 rows. I tried to
    > delete 2500 rows in my excel but it took me more than half an hour to
    > delete it either by vba code or manually by excel. I tried using office
    > clipboard manually, it paste the data as value and my formula isn't
    > there anymore.
    >
    > Anybody has any idea how to write a vba program to solve this problem
    > and how to write a office clipboard in vba.
    >
    > Please help... anybody...
    >
    > DESPERATE FOR THE ANSWER
    >
    > --
    > shirley_kee
    > ------------------------------------------------------------------------
    > shirley_kee's Profile: http://www.excelforum.com/member.php...o&userid=30384
    > View this thread: http://www.excelforum.com/showthread...hreadid=500484


    --

    Dave Peterson

+ 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