cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Reverse a string

How can I reverse a a full name and add a comma between each word?

 

Example: ”Johan Ericsen” should be ”Ericsen, Johan”

2 ACCEPTED SOLUTIONS

Accepted Solutions
ansrikanth
Resolver III
Resolver III

something like this should work.. 

With(
    {names: Split("FirstName LastName"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

obv, this presumes you have only firstname lastname (no middle names and a space between names)

 

Thank you

-Srikanth

View solution in original post

@Anonymous 

I just gave firstname and last name as an example.. like how you gave an example of "Johan Ericsen".. If I have to use your example it self in the formula then it would be .. 

With(
    {names: Split("Johan Ericsen"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

Hope that clears .. 

 

Thank you

-Srikanth

 

View solution in original post

8 REPLIES 8
ansrikanth
Resolver III
Resolver III

something like this should work.. 

With(
    {names: Split("FirstName LastName"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

obv, this presumes you have only firstname lastname (no middle names and a space between names)

 

Thank you

-Srikanth

Himanshu_90677
Super User
Super User

Concatenate( LastName, ", ", FirstName )

Anonymous
Not applicable

I dont't have last and first name..

Anonymous
Not applicable

I dont't have last and first name..

@Anonymous 

I just gave firstname and last name as an example.. like how you gave an example of "Johan Ericsen".. If I have to use your example it self in the formula then it would be .. 

With(
    {names: Split("Johan Ericsen"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

Hope that clears .. 

 

Thank you

-Srikanth

 

Himanshu_90677
Super User
Super User

try This

Mid(User().FullName,Find(" ",User().FullName)+1) & ", " & Left(User().FullName, Find(" ",User().FullName)-1)

Anonymous
Not applicable

thank you very much!

Anonymous
Not applicable

Thank you sir!

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,972)