Forum Discussion

natshuvens's avatar
natshuvens
New Contributor
3 years ago

Business rule to work like the Left and Find formulas in Excel

My source file has a column that contains both, account name and account description. The account names are either 4, 6, or 7 characters and there is a dash (-) in between the name and description (see example below). I'm trying to extract the account name but I have not had any luck with the In String function. Any suggestions?

 

Account Name and description:

123456 - Cash

2345 - Accounts Payable

3456789 - API

Function in Excel: =LEFT(A1,FIND("-",A1)-2))

  • Dim fields as List(Of String) = StringHelper.SplitString(args.Value, "-", StageConstants.ParserDefaults.DefaultQuoteCharacter)

    Return fields(0).Trim

  • EricOsmanski's avatar
    EricOsmanski
    Valued Contributor

    Dim fields as List(Of String) = StringHelper.SplitString(args.Value, "-", StageConstants.ParserDefaults.DefaultQuoteCharacter)

    Return fields(0).Trim