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

To Anyone who can help,

I have a three columns I am working with and a list of addresses i
contained in the third. Each address listing ends in a phone number
which is listed as

(***)***-****

I would like to insert a row after each phone number by searching fo
the first parenthesis "(". The ActivateCell function is not working a
hoped. Here is the vba I have thus far:


Worksheets("sheet1").Activate
Range("C1").Select

Dim newrng As Range, newcell As Range
Set newrng = Columns(1).SpecialCells(xlConstants, xlTextValues)
For Each newcell In newrng
If Left(newcell.Value, 1) = "(" Then
ActiveCell.EntireRow.Insert
End If
Next

Thanks for any help

--
Message posted from http://www.ExcelForum.com

 
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 rows inbetween rows of data ? Azeem Excel Discussion (Misc queries) 1 October 27th 09 07:38 AM
Inserting rows Vicki Excel Discussion (Misc queries) 12 January 29th 09 04:04 AM
Copying & Inserting Rows w/o Affecting other Rows Etc. LRay67 Excel Worksheet Functions 1 October 22nd 08 02:10 AM
Inserting Blank rows after every row upto 2500 rows Manju Excel Worksheet Functions 8 August 22nd 06 12:54 PM
Inserting Rows IanW Excel Discussion (Misc queries) 4 February 19th 06 08:26 PM


All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"