#1   Report Post  
StuNVA
 
Posts: n/a
Default Inserting Rows


I have a spreadsheet that I need to insert a blank row under a number
everytime it changes. The column may have 500 rows and the first twenty
or so may all be the number 10 for example, the next five might be the
number 8, I need a row between the last number ten and the first number
eight. This may be repeated many times through the spreadsheet.

Any help would be appreciated, I am not really up to speed on Macros
and such but have a good handle on formula's, so if the problem is
fixed using macro's please use as plain english as you can.

Thanks

Stu


--
StuNVA
------------------------------------------------------------------------
StuNVA's Profile: http://www.excelforum.com/member.php...o&userid=25540
View this thread: http://www.excelforum.com/showthread...hreadid=389777

  #2   Report Post  
bj
 
Posts: n/a
Default

If your numbers are in column A
and if the numbers are truely equal
and if there are no blanks initially
try

sub blnkentery()
nr=Application.WorksheetFunction.counta("A:A")
for r = nr to 2 step -1
cells(nr,1.select
if cells(nr,1) < cells(nr-1,1) then Selection.EntireRow.Insert
next r
end sub



"StuNVA" wrote:


I have a spreadsheet that I need to insert a blank row under a number
everytime it changes. The column may have 500 rows and the first twenty
or so may all be the number 10 for example, the next five might be the
number 8, I need a row between the last number ten and the first number
eight. This may be repeated many times through the spreadsheet.

Any help would be appreciated, I am not really up to speed on Macros
and such but have a good handle on formula's, so if the problem is
fixed using macro's please use as plain english as you can.

Thanks

Stu


--
StuNVA
------------------------------------------------------------------------
StuNVA's Profile: http://www.excelforum.com/member.php...o&userid=25540
View this thread: http://www.excelforum.com/showthread...hreadid=389777


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 columns within certain rows only crimsonkng Excel Discussion (Misc queries) 4 July 14th 05 05:13 PM
Automatically inserting rows ausdiver99 Excel Worksheet Functions 1 June 2nd 05 02:15 PM
Inserting Rows w/formulas question Buckwheat Excel Worksheet Functions 4 May 7th 05 10:05 PM
inserting rows through external data source [email protected] Excel Discussion (Misc queries) 0 April 5th 05 03:16 AM
Inserting Multiple Rows with Formulas ShineboxNJ Excel Worksheet Functions 2 November 18th 04 02:30 AM


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