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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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
:smile:
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,223,320
Messages
6,171,432
Members
452,402
Latest member
siduslevis

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