I have a formula in Excel that I want to use as calculated value in sharepoint lists.
The cell in Excel is shown below

It is simply adding 5 characters ID (use first letter of category, zeros, and not repeated count) with formula:
=CONCATENATE(LEFT(B2;1);IF(COUNTIF($B$2:B2;B2)<10;"000";IF(COUNTIF($B$2:B2;B2)<100;"00";"0"));COUNTIF($B$2:B2;B2))
If I want to use it on my Sharepoint lists, is it possible to use range in COUNTIF formula? Or any idea using Flow that will result exactly same as the Excel formula?
Thanks.