Forum Discussion
Anıl Adaş
Jul 03, 2018Brass Contributor
I need HELP with excel sheet sample below
Hello, I have same numbers with same colours.(Ex: Yellow for 9101) I want to fill B column with 1 to infinity(1,2,3,4.....) for same numbers or colours(it does'n matter becasue every number ...
Nikhil Chaudhari
Jul 03, 2018Copper Contributor
Hi,
You can paste following formula in cell B2 and drag it all the way down to get desired results:
=IF(IFNA(VLOOKUP(A2,$A$1:$A1,1,FALSE),1)=1,1,COUNTIF($A$1:$A1,$A2)+1)
Please let me know if it helps. I have also attached a file for your reference.
Regards,
Nikhil
SergeiBaklan
Jul 03, 2018Diamond Contributor
Hi Nikhil,
Why do you need VLOOKUP here? Simple COUNTIF as Takmil suggested works fine.