Forum Discussion

KAM_Mumin's avatar
KAM_Mumin
Brass Contributor
Oct 31, 2022
Solved

MS Excel Custom Cell Formatting with Formula.

Hi Everyone! I make an excel sheet for creating Product ID and there I use formula to create the product ID. But the main thing is need to do that is the cell value format by the custom cell formatt...
  • Patrick2788's avatar
    Oct 31, 2022

    KAM_Mumin 

    Presuming data in A1, you could use:

    =LET(str,TEXTSPLIT(A1,"-"),prefix,TAKE(str,,1),n,TEXT(CHOOSECOLS(str,2),"0000"),nn,TEXT(TAKE(str,,-1),"000000"),TEXTJOIN("-",,prefix,n,nn))

     

    Flash Fill has mixed results with these IDs.

Resources