Forum Discussion
Santhi_Adusumilli
Dec 01, 2023Copper Contributor
How to write a formula for generating a number automatically based on year and running number
Hi There, Do you know the formula for generating a number automatically based on year and a running number? This generated number should be automatic and every year, it needs to start with that y...
Harun24HR
Dec 01, 2023Bronze Contributor
Santhi_Adusumilli Try the following formula-
=MAP(A4:INDEX(A4:A50000,COUNTA(A4:A50000)),LAMBDA(x,YEAR(x)&"-"&RIGHT("0000"&SUM(--(YEAR(A4:x)=YEAR(x))),4)))