Share via

Please assist with syntax for calculated column

Sherazad Ahmed 436 Reputation points
2021-02-10T15:39:20.23+00:00

Hello,

I am trying to create a calculated column to remove an apostrophe and the & sign from the text in column "Agent name". However I am receiving an error message that the syntax is incorrect. Please assist with correct syntax.

Here is the formula.

=REPLACE(REPLACE([Agent Name],SEARCH("'",[Agent Name]),"1","")([Agent Name],SEARCH("&",[Agent Name]),"1","")

thanks,

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments

Answer accepted by question author

Emily Du-MSFT 51,986 Reputation points Microsoft External Staff
2021-02-11T06:22:10.187+00:00

@Sherazad Ahmed
Please use following formula in the calculated column.

=REPLACE(REPLACE([Agent Name],SEARCH("&",[Agent Name]),1," "),SEARCH("'",[Agent Name]),1," ")  

Result:
66804-1.png


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.