Posts

Showing posts with the label Split string in SharePoint

Split string in 2 column

I have a field called "Location" in this field we are storing "City, State". Now we want to show city in other column and state in other column. Basically I want to split the "Location" column based on "," (comma). To achieve this goal I am using the functions: LEFT RIGHT SEARCH LEN IF ISERROR TRIM Let’s see how can we do this with use of above given functions. If Errors, I am using ISERROR formula =IF (ISERROR (currentFormula), "", currentFormula) I am going to create a calculated column called "City" and copy & paste the " =IF(ISERROR(LEFT(Location,(SEARCH(",",Location,1)-1))), "", TRIM(LEFT(Location,(SEARCH(",",Location,1)-1)))) " in the formula text box. This formula will check whether any error is coming or not if error is coming then it will return blank value otherwise show us "City Name" I am going to create a calculated colu