Seeking assistance w/ Auto Incrementing

DataQuest

New Member
Joined
Feb 21, 2011
Messages
3
Good morning. I'm hoping someone may be able to assist with an auto incrementing item, please.

I need to increment the last column of a set of numbers that represent employee Job IDs.

I need the goal value to begin at 00, and increment by 1 each time. But also not incrementing when the last value is a duplicate.

So, my goal column would need to look at the first column, second column, and third column of a row. If the row shares the same value in the first column, and unique numbers in the last column, then start at 00. If the value in the last column is a duplicate of the previous row, give it the same value. And when the value in the first column of a row changes, reset the goal value back to 00, and increment using the rules above.


Here's a sample of the data, along with what I would need the goal value to look like.

The data is in columns ABC: And the goal values are in col D:
Col A B C D

2222 12 8977 00
2222 12 8988 01
2222 12 8988 01
2222 12 8989 02
3333 04 8500 00
3333 04 8501 01
3333 04 8502 02
3333 04 8502 02

Thanks!!!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Assuming your list starts in row 2:
Code:
=IF(A2<>A1,0,IF(C1=C2,D1,D1+1))
 
Upvote 0
Thanks Glenn for the quick and helpful reply!!

The formual works perfectly. I do need to make the goal value two positions though (01,02,03), so I formatted the field (Number, Category = Custom, Type = 00), but am hoping to build that into the excel formula. Can this be done, too?

Regards,
Trish
 
Upvote 0
Yes, actually it can, like this:
Code:
=IF(A2<>A1,"00",TEXT(IF(C1=C2,D1,D1+1),"00"))
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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