Increment values in one column based on changes in another

captainentropy

Board Regular
Joined
Jan 7, 2011
Messages
52
I have lots of very large tables that look like the table below (just the first 4 columns; edited for clarity, column 5 is what I want to achieve). There's two groupings of data: ID1 and ID2. As the values in ID2 change the numbering in ID1 resets. But I need to create another ID - ID3 - which will continue the numbering in ID1 based on the last change in ID2 and retain the ID1 grouping (if it helps conceptually, ID2 identifies an image, and ID1 represents discreet units within the images, where each row is a unique element in each unit having multiple data points - val1-3). Ultimately I need to do analysis of each unit (ID1) but I can't group by ID1 since the numbering resets for each image (ID2). I hope this makes sense. Is this doable?

ID1val1val2val3ID2ID3
1
0.2144761322A
1
10.3025491280A1
20.2144771252A2
30.3025901772A3
30.3026021676A3
30.4285971600A3
40.2145241695A4
40.2144551250A4
40.3025021970A4
50.2144082393A5
50.3026441542A5
50.3026461919A5
10.3027752487B6
10.3025131695B6
10.4785602032B6
10.4785541476B6
20.2145551573B7
20.4786501369B7
30.3027721120B8
30.3024831354B8

<tbody>
</tbody>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
TRY BELOW BUT FIRST SORT YOUR DATA 1ST BY ID2(ascending) THEN BY ID1 (ascending) THE USE BELOW FORMULA AND F3 FORMULA DRAG DOWN AS YOU WANT
Excel Workbook
ABCDEF
1ID1val1val2val3ID2ID3
210.2144761322A1
310.3025491280A1
420.2144771252A2
530.3025901772A3
630.3026021676A3
730.4285971600A3
840.2145241695A4
940.2144551250A4
1040.3025021970A4
1150.2144082393A5
1250.3026441542A5
1350.3026461919A5
1410.3027752487B6
1510.3025131695B6
1610.4785602032B6
1710.4785541476B6
1820.2145551573B7
1920.4786501369B7
2030.3027721120B8
2130.3024831354B8
Sheet5
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top