Prev: How do you limit the total allowed for a group of cells?
Next: Microsoft Responds to the Evolution of Online Communities
From: tran1728 on 4 May 2010 22:11 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/community/en-us/default.mspx?mid=61baed01-d921-47bf-b305-fd2e1ea61690&dg=microsoft.public.excel.misc
From: ozgrid.com on 4 May 2010 23:09 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" <tran1728(a)discussions.microsoft.com> wrote in message news:61BAED01-D921-47BF-B305-FD2E1EA61690(a)microsoft.com... > 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/community/en-us/default.mspx?mid=61baed01-d921-47bf-b305-fd2e1ea61690&dg=microsoft.public.excel.misc
From: tran1728 on 5 May 2010 03:06
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" <tran1728(a)discussions.microsoft.com> wrote in message > news:61BAED01-D921-47BF-B305-FD2E1EA61690(a)microsoft.com... > > 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/community/en-us/default.mspx?mid=61baed01-d921-47bf-b305-fd2e1ea61690&dg=microsoft.public.excel.misc > |