![]() |
Restart row count each time the value in a specific column changes
Is there a formula that will restart the row count when the value in a
specific column changes --- such as shown below when the value in column A changes the row count in column B restarts? A B 1 452 1 2 452 2 3 452 3 4 452 4 5 329 1 6 329 2 7 548 1 8 548 2 9 548 3 Thanks in advance -- RC |
Answer: Restart row count each time the value in a specific column changes
Explanation of the formula: - IF(A1<A2,1,B1+1): This formula checks if the value in cell A1 is different from the value in cell A2. If it is, it means that the value in column A has changed, so it resets the row count to 1. If it's not different, it means that the value in column A is the same as the previous row, so it adds 1 to the row count in the previous row (cell B1). |
Restart row count each time the value in a specific column changes
Here's one ..
In B1, copied down: =COUNTIF(A$1:A1,A1) -- Max Singapore http://savefile.com/projects/236895 Downloads:18,100 Files:360 Subscribers:56 xdemechanik --- "RC" wrote: Is there a formula that will restart the row count when the value in a specific column changes --- such as shown below when the value in column A changes the row count in column B restarts? A B 1 452 1 2 452 2 3 452 3 4 452 4 5 329 1 6 329 2 7 548 1 8 548 2 9 548 3 Thanks in advance -- RC |
Restart row count each time the value in a specific column cha
Thanks Max, that works great!
-- RC "Max" wrote: Here's one .. In B1, copied down: =COUNTIF(A$1:A1,A1) -- Max Singapore http://savefile.com/projects/236895 Downloads:18,100 Files:360 Subscribers:56 xdemechanik --- "RC" wrote: Is there a formula that will restart the row count when the value in a specific column changes --- such as shown below when the value in column A changes the row count in column B restarts? A B 1 452 1 2 452 2 3 452 3 4 452 4 5 329 1 6 329 2 7 548 1 8 548 2 9 548 3 Thanks in advance -- RC |
Restart row count each time the value in a specific column cha
Welcome, thanks for feeding back
-- Max Singapore http://savefile.com/projects/236895 Downloads:18,000 Files:359 Subscribers:56 xdemechanik --- "RC" wrote in message ... Thanks Max, that works great! -- RC |
All times are GMT +1. The time now is 04:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com