How to sequence using a condition

John Munoz

New Member
Joined
Feb 25, 2002
Messages
2
I'm looking for a formula that will sequence records based on a condition. Example: I have data listing employees by job code. I need to sequence those employees starting with "1" and restart when there is a different job code.
This message was edited by John Munoz on 2002-02-26 14:26
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi
Please post an example of what you are trying to do.
Can you not just use the sort function?
regards
Derek
 
Upvote 0
I'm looking for a formula that can create a sequence and restart based on changes in the job code. Naturally, the job codes would have to be sorted first for this to work in a formulaic fasion.

Example:

Job Code Sequence Name
00001 1 Joe Blow
00001 2 Danny Boy
00002 1 Suzy Smith
00002 2 Donald Duck
00002 3 Micky Mouse
 
Upvote 0
On 2002-02-26 16:58, John Munoz wrote:
I'm looking for a formula that can create a sequence and restart based on changes in the job code. Naturally, the job codes would have to be sorted first for this to work in a formulaic fasion.

Example:

Job Code Sequence Name
00001 1 Joe Blow
00001 2 Danny Boy
00002 1 Suzy Smith
00002 2 Donald Duck
00002 3 Micky Mouse

Hi John,

in your above example, in cell B2 try the following :

=COUNTIF($A$2:A2,A2)

and drag down

Formula still retains its integrity if you add or delete rows in your range and I'll stick my neck out saying it still works if not sorted by job code

Hope this helps
Chris
:)
This message was edited by Chris Davison on 2002-02-26 19:18
This message was edited by Chris Davison on 2002-02-26 19:19
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,114,002
Members
448,543
Latest member
MartinLarkin

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