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

descriptionautomatic numbering
w11
w11
w21
w31
w12
w31
w21
w32
w32
w33
w22
w22
w33
w12

<colgroup><col><col></colgroup><tbody>
</tbody>

For the support and attention
Thank You...

<colgroup><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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:


Desire
No.descriptionautomatic numbering
1w11
2w11
3w21
4w31
5w12
6w31
7w21
8w32
9w32
10w33
11w22
12w22
13w33
14w12
Quantity
w1=4in every 2 times will be automatic number (start in 1)
w2=4in every 2 times will be automatic number (start in 1)
w3=6in every 2 times will be automatic number (start in 1)

<colgroup><col><col><col><col span="2"></colgroup><tbody>
</tbody>

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
Quantity
w1=4in every 2 times will be automatic number (start in 1)
w2=4in every 2 times will be automatic number (start in 1)
w3=6in every 2 times will be automatic number (start in 1)

<tbody>
</tbody>
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,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

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