ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   auto increase number if number is double or more (https://www.excelbanter.com/excel-worksheet-functions/136285-auto-increase-number-if-number-double-more.html)

chapeau_melon

auto increase number if number is double or more
 
This is what I'dd like to do

1000
1000
2000
3000
3000
3000

have to become

1000 1
1000 2
2000 1
3000 1
3000 2
3000 3
etc...

Kind regards


David Biddulph[_2_]

auto increase number if number is double or more
 
In B2, =IF(A2=A1,B1+1,1) , and copy down
--
David Biddulph

"chapeau_melon" wrote in message
oups.com...
This is what I'dd like to do

1000
1000
2000
3000
3000
3000

have to become

1000 1
1000 2
2000 1
3000 1
3000 2
3000 3
etc...

Kind regards




chapeau_melon

auto increase number if number is double or more
 
Excellent thank you very much for the quick reply


Kevin Vaughn[_2_]

auto increase number if number is double or more
 
On Mar 26, 6:55 am, "chapeau_melon" wrote:
Excellent thank you very much for the quick reply


A formula like this:
=COUNTIF($A$1:A1,A1)
might also work for you, although if your data was not sorted, ie
something like this:
1000
1000
2000
3000
3000
2000
3000
The 2nd occurrence of 2000 might not give you the answer you wanted
(but then again, it might depending on your needs.)


Toppers

auto increase number if number is double or more
 
Not sure whether you want the 1,2 etc in separate column:

in B1 and copy down

=COUNTIF($A$1:A1,A1) will get the 1,2, 3 etc

this will combine in a single column :

=A1 &" "&COUNTIF($A$1:A1,A1)

HTH

"chapeau_melon" wrote:

This is what I'dd like to do

1000
1000
2000
3000
3000
3000

have to become

1000 1
1000 2
2000 1
3000 1
3000 2
3000 3
etc...

Kind regards




All times are GMT +1. The time now is 06:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com