Skip to main content
Newcomer
Oct 25, 2022 8:28 PM UTC
Solved

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))

Employee - Mentor
Oct 26, 2022 5:32 PM UTC

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

Return fields(0).Trim

1 reply

Employee - Mentor
Oct 26, 2022 5:32 PM UTC

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

Return fields(0).Trim