Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Selection Change - Data Sub Totals?
Please correct my macro.
Line1 is OK LastLine - The worksheet "flickers" (like doing a loop) for about 5 seconds. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell = "$G$5" Then GoTo Line1 If ActiveCell = "$L$5" Then GoTo LastLine Line1: If Intersect(Target, Me.Range("G5")) Is Nothing Then 'do nothing Else Selection.RemoveSubtotal Range("A5").Select End If LastLine: If Intersect(Target, Me.Range("L5")) Is Nothing Then 'do nothing Else Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3, 4, 5, 6, _ 7, 8, 9, 10, 11, 12), Replace:=True, PageBreaks:=False, SummaryBelowData:=True Range("A5").Select End If End Sub Whats wrong with it? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't change source data path for Pivot Chart | Charts and Charting in Excel | |||
ranking query | Excel Discussion (Misc queries) | |||
Collecting weekly and monthly totals from daily data | Excel Worksheet Functions | |||
Inserting a new line when external data changes | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions |