ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insert New Row When Column Amount Changes (https://www.excelbanter.com/excel-worksheet-functions/24709-insert-new-row-when-column-amount-changes.html)

Ronald \Tony\ Johnson

Insert New Row When Column Amount Changes
 
Here is an example of what I am talking about.

A B C D
1 A B C D
2 2 41100 274 584
3 2 41100 274 625
4 2 41100 274 333
5 2 41100 274 102
6 2 41100 274 957
7 2 41100 274 362
8 2 41100 274 651
9 2 41100 274 611
10 2 41100 284 965
11 2 41100 284 336
12 2 41100 284 251
13 2 41100 284 362
14 2 41100 284 859
15 2 41100 284 512
16 2 41100 284 669
17 2 41100 284 512


I need to insert a new row every time the amount in Column "C"
changes to a different amount than the previous one.
There are approx 16,000 rows in this file or I would not be asking..lol

Thanks for any help you can offer.


--
Tony Johnson

--
Tony Johnson

Debra Dalgleish

In cell E2, enter the formula:

=IF(C2=C1,"X",1)

Fill the formula down to the last row of data
Select column E
Choose EditGo to
Click the Special button
Select Formula, and remove the check marks from Text, Logicals and Errors
Click OK
Choose InsertRows
Delete Column E

Ronald \"Tony\" Johnson wrote:
Here is an example of what I am talking about.

A B C D
1 A B C D
2 2 41100 274 584
3 2 41100 274 625
4 2 41100 274 333
5 2 41100 274 102
6 2 41100 274 957
7 2 41100 274 362
8 2 41100 274 651
9 2 41100 274 611
10 2 41100 284 965
11 2 41100 284 336

I need to insert a new row every time the amount in Column "C"
changes to a different amount than the previous one.
There are approx 16,000 rows in this file or I would not be asking..lol

Thanks for any help you can offer.


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com