Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting rows via macro


Hello,

I am trying to insert a row in colum b below each cell that contains
1

thanks much

Chuc

--
clan
-----------------------------------------------------------------------
clane's Profile: http://www.excelforum.com/member.php...fo&userid=1186
View this thread: http://www.excelforum.com/showthread.php?threadid=27501

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Inserting rows via macro

Try this one

Sub test()
Dim Rng As Range
Dim findstring As String
findstring = "1"
Set Rng = Range("B:B").Find(What:=findstring, LookAt:=xlWhole)
While Not (Rng Is Nothing)
Rng.EntireRow.Insert
Set Rng = Range("B" & Rng.Row + 1 & ":B" & Rows.Count) _
.Find(What:=findstring, LookAt:=xlWhole)
Wend
End Sub


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


"clane" wrote in message ...

Hello,

I am trying to insert a row in colum b below each cell that contains a
1

thanks much

Chuck


--
clane
------------------------------------------------------------------------
clane's Profile: http://www.excelforum.com/member.php...o&userid=11865
View this thread: http://www.excelforum.com/showthread...hreadid=275018



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
Inserting Blank Rows Macro? Michael Saffer Excel Worksheet Functions 2 November 9th 04 06:23 PM
Inserting Rows Macro -- please help!! tratliff[_10_] Excel Programming 4 August 24th 04 03:03 PM
Inserting rows macro Jonsson Excel Programming 2 January 8th 04 02:03 PM
Inserting Rows Through a Macro Mike[_56_] Excel Programming 3 October 8th 03 03:52 AM
INSERTING ROWS WITH A MACRO Jay Dean Excel Programming 15 September 16th 03 05:08 PM


All times are GMT +1. The time now is 11:48 AM.

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"