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

natshuvens
New Contributor

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

1 ACCEPTED SOLUTION

EricOsmanski
Valued Contributor

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

Return fields(0).Trim

View solution in original post

1 REPLY 1

EricOsmanski
Valued Contributor

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

Return fields(0).Trim