View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Insert a blank row (2)

Hi Robert

Untested but try this one
I use xlPart now

Sub test2()
' above the word
Dim Rng As Range
Dim findstring As String
findstring = "Total"
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" wrote in message ...
Dear Ron,
Your code a while earlier works beautifully only if "Total" appears.
My Totals are created by a recorded macro DataSubtotal and is therefore
"......Total".
How should the resulting code be modified to (1) (if possible) to
bold the entire Total Line (now only the break identifier is Bold),
(2) Insert a blank row after each line having the "........... Total").


Thank you.
--
Robert