Automatic numbering in the unsequence's row for grouping

Onnyhendra

New Member
Joined
Feb 22, 2019
Messages
3
Can any one please help to make a excel's formula for the automatic numbering instead of manual as below sample

[TABLE="width: 236"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][TABLE="width: 236"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]description[/TD]
[TD]automatic numbering[/TD]
[/TR]
[TR]
[TD]w1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]w2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]w2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]w3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]w1[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

For the support and attention
Thank You...[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
You're more likely to get a reply if you provide a logic or pattern to what you're looking for?

There is no discernible pattern to the sample you've provided?

What determines whether the "automatic numbering" should be 1, 2, 3, x...
 
Upvote 0
Dear AOB, Thanks for the suggestion,

I don't how to explain more, basically as below:


[TABLE="width: 475"]
<colgroup><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Desire[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]No.[/TD]
[TD]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D][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]w1=4[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
[TR]
[TD]w2=4[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
[TR]
[TD]w3=6[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
</tbody>[/TABLE]

Thank you so much.
 
Upvote 0
B1: =1
B2: (confirm with ctrl+shift+enter,then copy down as far as necessary) =MAX(IF(A$1:A1=A2,B$1:B1))+IF(MOD(COUNTIF(A$1:A1,A2),2)=0,1,0)
 
Upvote 0
So if I get this right, you want the "automatic number" to effectively be a count of the description, but only to increment (1>2, 2>3 etc.) on every second instance of that description?

Assuming "description" is in column A and "automatic number" is in column B, and the first row of data is in row 2

This formula in cell B2 :

Code:
=ROUNDUP(COUNTIF($A$2:$A2,$A2)/2,0)

...dragged to the end of the data should produce he desired result

(Note the anchoring - enter the formula precisely as above or it won't work)
 
Upvote 0
[TABLE="width: 475"]
<tbody>[TR]
[TD]Quantity[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]w1=4[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
[TR]
[TD]w2=4[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
[TR]
[TD]w3=6[/TD]
[TD="colspan: 4"]in every 2 times will be automatic number (start in 1)[/TD]
[/TR]
</tbody>[/TABLE]
You had left the above out of your original post (it tells us the logic behind your numbers).

Now, if I understand your requirement correctly, this normally entered formula should work for you...

=ROUNDDOWN(COUNTIF(A$1:A1,A1)/2,0)+(MOD(COUNTIF(A$1:A1,A1),2)=1)
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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