Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default INSERT 3 ROWS WHEN DATA OF COLUM CHANGED

Good mornig, pls help me, i want insert 3 rows when the data changed
Colum A
Row 1 920
Row 2 920
Row 3 920
Row 4 728
Row 5 661

I want insertation automatique 3 rows atfter Rows3 and after rows4.
Thans so much.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default INSERT 3 ROWS WHEN DATA OF COLUM CHANGED

Try this macro

Sub AddRows()
Dim lrow As Long

For lrow = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(lrow, 1) < Cells(lrow - 1, 1) Then _
Cells(lrow, 1).Range("A1:A3").EntireRow.Insert
Next lrow

End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"tran1728" wrote in message
...
Good mornig, pls help me, i want insert 3 rows when the data changed
Colum A
Row 1 920
Row 2 920
Row 3 920
Row 4 728
Row 5 661

I want insertation automatique 3 rows atfter Rows3 and after rows4.
Thans so much.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default INSERT 3 ROWS WHEN DATA OF COLUM CHANGED

Thank you so much, it is OK.



"ozgrid.com" wrote:

Try this macro

Sub AddRows()
Dim lrow As Long

For lrow = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(lrow, 1) < Cells(lrow - 1, 1) Then _
Cells(lrow, 1).Range("A1:A3").EntireRow.Insert
Next lrow

End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"tran1728" wrote in message
...
Good mornig, pls help me, i want insert 3 rows when the data changed
Colum A
Row 1 920
Row 2 920
Row 3 920
Row 4 728
Row 5 661

I want insertation automatique 3 rows atfter Rows3 and after rows4.
Thans so much.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc


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
adding two colum cells only if there is data in 3rd colum stbob Excel Worksheet Functions 1 October 30th 09 05:48 AM
how to display data from rows to colum Giridhar Excel Discussion (Misc queries) 1 March 11th 06 06:27 AM
Keeping a sum colum correct after inserting a colum of data in fro hazel Excel Discussion (Misc queries) 3 October 19th 05 09:51 PM
Look up data in colum a and find match in colum b Chris(new user) Excel Discussion (Misc queries) 1 March 22nd 05 01:41 PM
Check data on colum A and find match on colum b Chris(new user) Excel Discussion (Misc queries) 3 March 20th 05 04:45 PM


All times are GMT +1. The time now is 12:49 PM.

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"