#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Insert Rows

Sub bold()
Dim i As Long
With Worksheets("12062006")
For i = 127 To 2 Step -1
If Cells(i, "A").Font.bold Then
MsgBox "hello"
Rows(i + 1).Resize(5).Insert
End If
Next i
End With
End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Alex" wrote in message
...
I am trying to insert 5 blank rows after a bold cell is found in a list.
here is the code I have so far.

thanks

Alex

Sub bold()
Dim rRange As String
For Each c In Worksheets("12062006").Range("A2:A127").Cells
If c.Font.bold = True Then MsgBox "hello"
Selection.EntireRow.Insert

Next

End Sub



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
insert rows in a worksheet that do not change adjoining rows craigandmel Excel Discussion (Misc queries) 2 April 29th 08 10:26 PM
How do i insert blank rows between data that is thousands of rows paul.eatwell Excel Discussion (Misc queries) 5 April 14th 08 10:49 PM
Insert rows: Formats & formulas extended to additonal rows Twishlist Excel Worksheet Functions 0 October 22nd 07 04:23 AM
How do I insert blank rows between rows in completed worksheet? bblue1978 Excel Discussion (Misc queries) 1 October 26th 06 07:02 PM
Copy Rows and insert these rows before a page break AQ Mahomed Excel Programming 0 June 8th 04 09:09 AM


All times are GMT +1. The time now is 09:18 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"