Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm about to take off on maternity leave in 8 days and I appreciate
all the help on this. With the help of a couple programmers. I've managed to get this - It works fine only the rows do not insert properly after the first set. The background color changes over the data and not adding a new row. I've uploaded an image example. http://bp1.blogger.com/_0XguicNvp2w/...-h/example.bmp Thanks again for all the efforts. Option Explicit Dim MyCell, MyRng As Range Dim i As Integer Private Sub CommandButton1_Click() Set MyRng = [a1:a65000] For Each MyCell In MyRng If InStr(MyCell.Value, "Total") 0 Then MyCell.Offset(1, 0).Select Do While i < 4 ActiveCell.EntireRow.Insert i = i + 1 Loop ActiveCell.Value = "Avails" ActiveCell.EntireRow.Interior.ColorIndex = 5 ActiveCell.Offset(1, 0).Value = "Left" ActiveCell.Offset(1, 0).EntireRow.Interior.ColorIndex = 6 End If Next MyCell i = 0 End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANKS STEVE & PAUL for your help on this!!!!
With your help I've got it to work.. Please, disregard this request. Regards, Gwen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row Insertion | Excel Discussion (Misc queries) | |||
Row Insertion Problem | New Users to Excel | |||
Rows Insertion | Excel Programming | |||
Line insertion | Excel Programming | |||
VBA Code- Row Insertion | Excel Programming |