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

  • Thread starter Thread starter shirley_kee
  • Start date Start date
S

shirley_kee

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top