Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub insert4()
dim lastrow as long, i as long lastrow = cells(rows.count,"G").End(xlup) for i = lastrow to 1 step - 1 if right(lcase(cells(i,"G").Value),3) = lcase("abc") then cells(i,1).offset(1,0).resize(4).Entirerow.Insert end if Next -- Regards, Tom Ogilvy End Sub "KENNY" wrote in message ... Thanks for responding... If I could bother you for a bit mo 1. To make it more efficient, I just need it to look through column G 2. The text I'm looking for is actually the last three letters of the text that appears in that column (Right, 3). If I'm not over-stepping, could you help? TIA -----Original Message----- Sub insert4() dim lastrow as long, i as long lastrow = cells(rows.count,1).End(xlup) for i = lastrow to 1 step - 1 if cells(i,1).Value = "certain text" then cells(i,1).offset(1,0).resize(4).Entirerow.Insert end if Next End Sub -- Regards, Tom Ogilvy "KENNY" wrote in message ... I'd like to insert four rows after certain text appears in a column. Any ideas? TIA . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert cell text every 5 rows in a column | Excel Discussion (Misc queries) | |||
Text to columns. Only the first column appears in the wizard. | Excel Discussion (Misc queries) | |||
Insert pagebreak when a specific word appears in a column. | Excel Discussion (Misc queries) | |||
Count the number of times specific text appears in a column | Excel Worksheet Functions | |||
how insert same text in empty cells in column (10000 rows) | Excel Worksheet Functions |