• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Resetting a counter based on cell value

Gregg Wolin

Member
Happy holidays everyone!
I have a table of data which includes a column that creates a unique, hierarchical ID for each row based on the contents of 2 other rows. I almost got it to work but the counter needs to reset based on the value of other columns in the same row.

The Parcel# formula is =A2+((COUNT(B2:B$2)/100)+B2)/10


A
Area
B
Phase
C
Parcel# >>>
111.101
111.102
111.103
121.204 >>>>
121.205
121.206
131.307 >>>>
131.308
131.309
131.310
212.111 >>>
212.112
222.213 >>>
222.214
Desired
1.101
1.102
1.103
1.201
1.202
1.203
1.301
1.302
1.303
1.304
2.101
2.102
2.201
2.202
 
test in cell C2:
=IF(B2=B1,C1+0.001,VALUE(A2&"."&B2)+0.001)
copied down.

edit: bosco_yip's is better because the data in columns A and B don't need to be in order.
 
Back
Top