0

I have the following string: XXXX.C.2.0.1

how do I extract just the "C"?

thanks

2
  • SharePoint Online? On-Premise? 2010, 2013? How do you want to get the "C"? Javascript? Directly in the form? Please give us some more information...
    – Patrick
    Commented Jun 19, 2015 at 11:53
  • 1
    Maybe it's possible to do it shorter and more readable, but this should to the trick. You can replace the hardcoded string with a column if you want =LEFT( RIGHT("XXXX.C.2.0.1", LEN("XXXX.C.2.0.1")-INT(FIND(".","XXXX.C.2.0.1")-1)-1), INT(FIND(".",RIGHT("XXXX.C.2.0.1", LEN("XXXX.C.2.0.1")-INT(FIND(".","XXXX.C.2.0.1")-1)-1))-1)) Commented Jun 19, 2015 at 12:36

1 Answer 1

-2

Source Using calculated field to retrieve substring of another field Suppose for example you have a field that contain the following data as in the above link :

==========================
|  Email Address         |
==========================
| [email protected]    |
| [email protected]   |
| [email protected]    |
==========================

And if you want to have the following result as shown below by removing the sub-strings from the Email Address column and display them in each indiviual UserName and Domain column

===========================================================
|  Email Address         |  UserName  |      Domain       |
===========================================================
| [email protected]    |   Jack     |   wonderland.com  |
| [email protected]   |   Peter    |   nobodyland.com  |
| [email protected]    |   Jill     |   wonderland.com  |
===========================================================

You can use the following method

  1. Create Calculated column called "UserName" and type in this formula

    =LEFT([Email Address],INT(FIND("@",[Email Address])-1))

  2. Create Calculated column called "Domain" and type in this formula

    =RIGHT([Email Address],LEN([Email Address])-INT(FIND("@",[Email Address])))

It should work.

And in your case you can modify the formula as per your needs. The above is just an example for the Calculated column formula

3
  • Seems like a copy from here sharepoint.stackexchange.com/questions/29140/…. Flag question as duplicate instead if you think it is one. Commented Jun 19, 2015 at 12:08
  • Please attribute the source Manish, blatently ripping off a question and answer without attribution may result in your post being deleted. Commented Jun 19, 2015 at 12:13
  • i did not had an option to flag the question as duplicate so i copied the answer from the above post. and i am sorry i forgto to mention the source. Commented Jun 19, 2015 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.