Excel Macro not working, any ideas? [Closed]

Report
Posts
1
Registration date
Wednesday October 18, 2017
Status
Member
Last seen
October 18, 2017
-
Hello,


I work at a university and no one here knows anything about Macros. I had a new computer built and lost all my Macros a previous coworker created.

I get a file daily. It can be a few rows or it can be well over 100 rows.
I want to keep visible A, B, D, L, AG, AL, AM, BG

when AG changes value I want to subtotal L and grand total at end

Or

when BG changes I need L to total and grand total at end



I have a similar Macro and just modified it to work with this info and it only does the Hide columns and nothing else. See below.


Sub manuals()
'
' manuals Macro
'

'
Columns("C:C").Select
Selection.EntireColumn.Hidden = True
Columns("E:K").Select
Selection.EntireColumn.Hidden = True
Columns("M:AF").Select
Selection.EntireColumn.Hidden = True
Columns("AH:AK").Select
Selection.EntireColumn.Hidden = True
Columns("AN:BF").Select
Selection.EntireColumn.Hidden = True
Range("L3").Select '
Selection.Subtotal GroupBy:=35, Function:=xlSum, TotalList:=Array(14, 15) _
, Replace:=True, PageBreaks:=False, SummaryBelowData:=True
' Hide all rows except total rows.
ActiveSheet.Outline.ShowLevels RowLevels:=2

End Sub



Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!