Forum Discussion

Bejoy1983's avatar
Bejoy1983
Copper Contributor
Sep 03, 2022
Solved

How to increment value in the middle

Hey all,

 

So I need help in finding out a method to automatically increment a centre value. So for example my value is XXX/0001/2022-23 and the value 001 should increase incrementally.

    • Bejoy1983's avatar
      Bejoy1983
      Copper Contributor

      Ok so now faced another issue.
      HC/0243/2022-23
      HC/0244/2022-23
      HC/0245/2022-23
      HC/0246/2022-23
      HC/0247/2022-23
      HC/0248/2022-23
      HC/0249/2022-23
      HC/1240/2022-23
      HC/1241/2022-23
      HC/1242/2022-23

      After 0249 instead of 0250 it goes to 1240. So basically i need to start from the number 0240 and not 0001.

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        Bejoy1983 

        ="HC/"&QUOTIENT(ROW(1:1)-1,10)&"24"&IF(MOD(ROW(1:1),10)=0,9,MOD(ROW(1:1),10)-1)&"/2022-23"

        Is this what you are looking for?

         

Resources