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

Thanks Bob !

It works perfectly.

You're a lifesaver.

--
Carlos

"Bob Phillips" wrote in message
...

For i = Cells(Rows.Count,"A").End(xlUp).Row to 2 Step -1
If Cells(i,"A").Value < Cells(i-1,"A").Value Then
Rows(i).Insert
End If
Next i

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CarlosAntenna" wrote in message
...
I have data for bills of material that I need to manipulate.
Most of what I need to do, I can do with formulas, but the first step

needs
a program because it changes the structure of the worksheet.

Column A contains the "parent item", column B contains the "child items".
There may be 2-50 children being assembled into each parent.

Consequently,
there will be 2-50 rows with the same data in column A.

I need to scan all of column A and each time the item number changes,

insert
a row in between.

I really need to do this programatically because there is over 100,000

rows
of data. (I had to split it between two worksheets.)

Can this be done?

Win2K
XL2002

Carlos






 
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
How to program excel to insert / delete any worksheet? Eric Excel Worksheet Functions 1 March 2nd 08 09:49 PM
insert html promotions into e-mail program brett100 Excel Discussion (Misc queries) 2 July 10th 07 12:35 AM
How do I insert a program I downloaded? Kimberly Excel Discussion (Misc queries) 4 February 20th 07 07:43 PM
how do i program excel to insert a new column monthly jo Excel Programming 0 April 6th 06 10:19 AM
How to insert a bitmap into Excel Cell in C# program? Sundarraj Natarajan Excel Programming 0 July 29th 04 03:58 PM


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