![]() |
Formatting? may be
I do a lot of subtotaling. I have different depts with diffeent charge codes but all share the same GL code. Ex Printing/Copy GL code 4400, for admin it will have a 001 extension while for the security dept it will be 002. I sort expenses based on the main GL 4400. I now have to hide a lot of rows so that my boss can see only the major expenses. I currently hide rows one by one or sector by sector. I am sure there is a short cut for this craziness. Can you help? -- ab3d4u |
Formatting? may be
Hopefully one of these macros will give you what you need...these are just
samples...you will have to make a few small modifications... This macro will hide all blanks in a range: Sub HideBlanks() Dim rng As Range On Error Resume Next Range("A1:A20").EntireRow.Hidden = False Set rng = Range("A1:A20").SpecialCells(xlBlanks) On Error GoTo 0 If Not rng Is Nothing Then rng.EntireRow.Hidden = True End If End Sub This macro will hide all cells that match a certain criteria in a range (obviously the criteria is €śHide Me€ť; get creative and change it to what you want): Sub HideRows() Dim LastRow As Long Dim i As Long ActiveSheet.UsedRange.Rows.Hidden = False LastRow = Cells(Rows.Count, 1).End(xlUp).Row For i = LastRow To 2 Step -1 If InStr(1, Cells(i, 1), "Hide Me", vbTextCompare) + _ InStr(1, Cells(i, 2), "Hide Me", vbTextCompare) Then Rows(i).Hidden = True End If Next End Sub Regards, Ryan--- "ab3d4u" wrote: I do a lot of subtotaling. I have different depts with diffeent charge codes but all share the same GL code. Ex Printing/Copy GL code 4400, for admin it will have a 001 extension while for the security dept it will be 002. I sort expenses based on the main GL 4400. I now have to hide a lot of rows so that my boss can see only the major expenses. I currently hide rows one by one or sector by sector. I am sure there is a short cut for this craziness. Can you help? -- ab3d4u |
All times are GMT +1. The time now is 08:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com