I have the below string stored in a SharePoint Column:


I want to extract the value after the last comma. That is I need to extract only 12656 and use it for other operations.

How to achieve this using SP 2010 Designer workflow or calculated column?


You can create new calculated column with "Single line text" or "number" type. Add the below given formula to extract the value after last comma.

Formula for calculated column is:


Note: Here I have used "Title" column for creating formula. Please replace it with your column name during applying the formula.

Hope this will help you!

| improve this answer | |

Dikesh has the right answer to the OP's precise question. But it only works with the supplied example. Two problems:

  • It returns blank if there is only one numeric value, or Title is blank.
  • It extracts the last value, but only if it is the same length as the first value. (Change the first value to 12 to see what happens.)

First, a solution that counts backwards looking for a comma:

If you just want the last number, and the number of digits is not more than six (add to the formula for more) then:



Second, a solution that uses sightly reformatted data. If we can change:


to: (extra spaces so each is always five characters)

11608,  613,   12,12643,12644,12656

Then this works nicely for up to six numbers ("TheCol" is your column name):

    IF(LEN(TheCol)-LEN(SUBSTITUTE(TheCol,",",""))=1, MID(TheCol,7,5),
      IF(LEN(TheCol)-LEN(SUBSTITUTE(TheCol,",",""))=2, MID(TheCol,13,5),
        IF(LEN(TheCol)-LEN(SUBSTITUTE(TheCol,",",""))=3, MID(TheCol,19,5),
          IF(LEN(TheCol)-LEN(SUBSTITUTE(TheCol,",",""))=4, MID(TheCol,25,5),
            IF(LEN(TheCol)-LEN(SUBSTITUTE(TheCol,",",""))=5, MID(TheCol,31,5),


| improve this answer | |
  • Thanks Mike for shedding more lights on Excel formulas. – Dikesh Gandhi Sep 23 '19 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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