Formula field to separate strings in a Text field
Suppose Field1 contains a, b, c
We want the following formula fields with the values as -
Field2 - a
Field3 - b
Field4 - c
and so on
Solution:
For 'a' or Field2 it is done as TRIM(LEFT(Field1__c , FIND(",", Field1__c)-1))
For 'b' or Field3 it is done as LEFT(RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c)), FIND("," , RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c)))-1)
For 'c' or Field4 it is done as LEFT(RIGHT(Field1__c, LEN(RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c))) - FIND (",", RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c)))), FIND("," , RIGHT(Field1__c, LEN(RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c))) - FIND (",", RIGHT(Field1__c, LEN(Field1__c) - FIND (",", Field1__c)))))-1)
and so on
Comments
Post a Comment