Split state to state code

HI

I have indian state i want to split like State to state code

West Bengal - WB
Maharashtra to MH
Kerla To Kl
like that

please help me guys

@2coms
var.split("-"c)

it is not working can share u excel sheet

Please share

Hi thanks
please split i have fill only some state
please i want tio do like that New Microsoft Excel Worksheet.xlsx (14.9 KB)

@2coms

What you are asking is not logical rather it is purely a human intelligence.
Advide you to create an array for same and use it.

@2coms I think you would need to implement a Static Dictionary for this use case, as I guess you’ll be using only the State names of India.

1 Like

@2coms Here you can get all the State Codes :hugs:

1 Like

@2coms

There will be not custom logic i believe, you need to prepare all the states short list in the excel and compare the row then using for each and you can take the second column value based upon the value

Hope this helps

Thanks