sharepoint calculated column for sum of two column

gogi100 51 Reputation points
2023-09-04T12:37:06.8833333+00:00

i need a formula in calculated column for sum of two columns that are the type text. the format in text column is Г:2 М:05 Д: 10. the formula would works next: Г:2 М:05 Д: 10 + Г:5 М:03 Д: 1 = Г:7 М:08 Д: 11

Г is year

M is mounth

D is day

can you help me?

year

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2023-09-05T06:17:54.6766667+00:00

    Hi @gogi100,

    Per my test, you can use MID to extract the numbers and use CONCATENATE to connect string and the calculate result, please refer to following formula

    CONCATENATE("Г: ",MID(Column1,3,2)+MID(Column2,3,2),"М: ",MID(Column1,7,2)+MID(Column2,7,2),"Д: ",MID(Column1,13,2)+MID(Column2,13,2))
    
    
    

    User's image


    Here is a nice article about this issue

    https://stackoverflow.com/questions/23494276/sharepoint-calculated-field-get-number-only


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


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.