ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Resetting values based on change in cells of other column (https://www.excelbanter.com/excel-discussion-misc-queries/43816-resetting-values-based-change-cells-other-column.html)

NSteinner

Resetting values based on change in cells of other column
 
I need help with doing the following logic in my worksheet

A B C
1 1 1
1 2 2
1 3 3
2 4 1
2 5 2

I want column C to restart its incrementing whenever column switches to a
new value.


Any help would be appreciated.



Gary's Student

From you example, you want column C to increment unless Column A changes

manually put 1 in C1 first

Put =IF(A2=A1,C1+1,1)
in cell C2 and copy down.
--
Gary's Student


"NSteinner" wrote:

I need help with doing the following logic in my worksheet

A B C
1 1 1
1 2 2
1 3 3
2 4 1
2 5 2

I want column C to restart its incrementing whenever column switches to a
new value.


Any help would be appreciated.




All times are GMT +1. The time now is 12:15 AM.

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