Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robert
 
Posts: n/a
Default Dedrie, FORMATTING SUBTOTALS

In response to your recent query, Ron de Bruins following code will definately
help you.

-- Alt-F11 to open the VBA editor
Insert module from the menubar
Paste the sub
Alt-Q to go back to excel

Alt-F8
Select test
Run

Sub test()
Dim Rng As Range
Dim findstring As String
findstring = "subtotal"
Set Rng = Range("A:A").Find(What:=findstring, After:=Range("A" & Rows.Count), LookAt:=xlPart)
While Not Rng Is Nothing
'Rng.EntireRow.Cells.Font.Bold = True
Rng.EntireRow.Insert
Set Rng = Range("A" & Rng.Row + 1 & ":A" & Rows.Count) _
.Find(What:=findstring, After:=Range("A" & Rows.Count), LookAt:=xlPart)
Wend
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


Robert
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
Formatting Subtotals Dedrie Excel Worksheet Functions 2 August 19th 05 07:17 AM
Conditional Formatting and Subtotals Mary Ann Excel Discussion (Misc queries) 2 August 10th 05 12:09 PM
Formatting Subtotals slh Excel Discussion (Misc queries) 1 May 13th 05 01:26 PM
How do I use conditional formatting to change subtotals row format Ken Peterson Excel Worksheet Functions 3 March 24th 05 04:58 PM
formatting subtotals S. H. Drew Excel Discussion (Misc queries) 0 March 10th 05 04:05 PM


All times are GMT +1. The time now is 09:52 PM.

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

About Us

"It's about Microsoft Excel"