LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old June 27th 05, 05:13 AM
Jerry Cropanese
Posts: n/a
Default Remove Subtotal In Macro Not Working


I built a macro using excel 97 that does a subtotal of a list of 100 - 5000
rows x 6 columns and later removes the subtotal. This macro took
approximately 15 to 30 seconds to run using excel 97 under a win 98
platform. We finally upgraded to win xp and excel 2002. As soon as the
macro runs the line "Selection.RemoveSubtotal", the whole thing reduces to a
crawl and I end up having to blow off excel or it will sit for over 1/2

I tried to run the macro to the point where the problem line exists and then
do the remove subtotal manually but I receive the same result.

Can you see any reason for this problem?



Selection.SUBTOTAL GroupBy:=3, Function:=xlCount, TotalList:=Array(3,
5), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=RC[-4],""X"","""")"
ActiveCell.FormulaR1C1 = "=R[1]C[-1]"
ActiveCell.Offset(0, 5).Range("A1").Select
ActiveCell.FormulaR1C1 = "x"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "x"
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Application.CutCopyMode = False
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
False, Transpose:=False
Application.CutCopyMode = False

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative Cell position NOT working with or without macro Scratching my Head Excel Discussion (Misc queries) 6 May 30th 05 06:12 PM
Macro or Formula to remove Text from Cells smck Excel Worksheet Functions 6 May 11th 05 03:22 AM
How do I remove the individual subtotal lines from a pivot table.. leo Excel Discussion (Misc queries) 2 March 16th 05 03:19 AM
Macro working in "This Workbook", but not while in "Personal.xls" markx Excel Worksheet Functions 2 March 7th 05 04:08 PM
Macro not working with Excel 2003 Fernando Gomez Excel Discussion (Misc queries) 1 December 16th 04 12:19 AM

All times are GMT +1. The time now is 03:54 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 ExcelBanter.
The comments are property of their posters.

About Us

"It's about Microsoft Excel"


Copyright © 2017