Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default 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

Reply
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
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM
Pivot Table border formatting and pivot chart formatting [email protected] Excel Discussion (Misc queries) 0 July 22nd 05 02:22 PM


All times are GMT +1. The time now is 02:56 AM.

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

About Us

"It's about Microsoft Excel"