For instance:
Source value is: "The Really Cool Company - C7"
The result coming out of the formula is: "C-007"
The practical use is to provide an attribute that can be used for alphabetic sorting, without having to perform a lot of data cleanup.
Formula:
=(MID(RIGHT(TRIM(Company),(LEN(TRIM(Company))-FIND("-",TRIM(Company)))),2,1))&"-"&(TEXT(MID(RIGHT(TRIM(Company),(LEN(TRIM(Company))-FIND("-",TRIM(Company)))),3,3),"000"))

No comments:
Post a Comment