How to: Generate next sequential number after two dropdown cell options?

Thall_WA

New Member
Joined
Nov 3, 2016
Messages
1
Hi,

I am creating a master register for internal business documents, each shall have their own unique document number.
I have a dropdown for cells under DIV and DOC, with list parameters on separate datasheet. I have a partial formula within DOCUMENT NUMBER column of =($A2&"-"&$B2&"-"&$C2), which combines DIV selection and DOC selection and the SEQ sequential number (separate with "-"). But I need the sequential number generated, based off how many times the combination of DIV+DOC has been selected previously. I'm hoping this will be enough, but will have a failsafe of conditional duplicate formatting on just in case.

Looks like this:


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]DIV[/TD]
[TD]DOC[/TD]
[TD]SEQ[/TD]
[TD]DOCUMENT NUMBER[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD]00001[/TD]
[TD]GOW-SOW-00001[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD]00002[/TD]
[TD]GOW-SOW-00002[/TD]
[/TR]
</tbody>[/TABLE]


Am I on the right track, or is there alternate/easier solution?

Thanks for your help
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
[TABLE="width: 496"]
<colgroup><col span="3"><col><col span="2"></colgroup><tbody>[TR]
[TD]DIV[/TD]
[TD]DOC[/TD]
[TD]SEQ[/TD]
[TD]DOCUMENT NUMBER[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD="align: right"]1[/TD]
[TD]GOW-SOW-00001[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD="align: right"]2[/TD]
[TD]GOW-SOW-00002[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GO[/TD]
[TD]SLOW[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GO[/TD]
[TD]SLOW[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GRO[/TD]
[TD]SOW[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GO[/TD]
[TD]SLOW[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]GO[/TD]
[TD]SLOW[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SO[/TD]
[TD]SLOW[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]FORMULA GIVING THE 1 UNDERNEATH SEQ[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]=SUMPRODUCT(($A$2:A2=A2)*($B$2:B2=B2))[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]and just drag down[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]format as 00000 obviously[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
To generate the sequential number, I would create an aux column with DIV & DOC, and then on column D use =countif($C$1:$C1,C1).

This way, the first combination will generate a 1, the second time it appears a 2 and so on.

Then DIV & DOC & Text(D1,"00000").

Hope it helps
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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