Flip words in same cell.

ctanxcel

New Member
Joined
Jul 14, 2024
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hi
I want to flip words in same cell. Is there any formula.
Examples
Cell A1 "1232 india"
Cell A1 "India: 1232;"

Thanks in advanced
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
In 365 e.g.

Excel Formula:
=TEXTAFTER(A1," ")&": "&TEXTBEFORE(A1," ")&";"
 
Upvote 1
Solution
Hello Good Morning.
Hope you are doing well 😊
Could you help me with this. I want to flip words in same cell but now with abbreviations. Is there any formula that helps.
Examples
Cell A1 "1232 india 445 United States 468 United Kingdom 96 United Arab Emirates"
Into this format
Cell A1 "India: 1232; US: 445; UK: 468; UAE: 96;"

Thanks in advanced
 
Upvote 0
Hello Good Morning.
Hope you are doing well 😊
Could you help me with this. I want to flip words in same cell but now with abbreviations. Is there any formula that helps.
Examples
Cell A1 "1232 india 445 United States 468 United Kingdom 96 United Arab Emirates"
Into this format
Cell A1 "India: 1232; US: 445; UK: 468; UAE: 96;"

Thanks in advanced
UDF (User define formula) may help
Are you OK with VBA solution?
 
Upvote 0
Hello, test this:

Excel Formula:
=LET(
a,A1,
b,TEXTSPLIT(TRIM(REDUCE(a,CHAR(VSTACK(SEQUENCE(15,,33),SEQUENCE(198,,58))),LAMBDA(a,b,SUBSTITUTE(a,b,""))))," ")&"; ",
c,TRIM(TEXTSPLIT(REDUCE(A1,SEQUENCE(10,,0),LAMBDA(a,b,SUBSTITUTE(a,b,"@"))),"@")),
d,FILTER(c,c<>""),
e,REDUCE(d,VSTACK(SEQUENCE(10,,0),CHAR(SEQUENCE(26,,97)),CHAR(32)),LAMBDA(a,b,SUBSTITUTE(a,b,""))),
CONCAT(TOCOL(VSTACK(IF(LEN(e)=1,d,e)&": ",b),,TRUE)))
 
Upvote 0
Hello, test this:

Excel Formula:
=LET(
a,A1,
b,TEXTSPLIT(TRIM(REDUCE(a,CHAR(VSTACK(SEQUENCE(15,,33),SEQUENCE(198,,58))),LAMBDA(a,b,SUBSTITUTE(a,b,""))))," ")&"; ",
c,TRIM(TEXTSPLIT(REDUCE(A1,SEQUENCE(10,,0),LAMBDA(a,b,SUBSTITUTE(a,b,"@"))),"@")),
d,FILTER(c,c<>""),
e,REDUCE(d,VSTACK(SEQUENCE(10,,0),CHAR(SEQUENCE(26,,97)),CHAR(32)),LAMBDA(a,b,SUBSTITUTE(a,b,""))),
CONCAT(TOCOL(VSTACK(IF(LEN(e)=1,d,e)&": ",b),,TRUE)))
Thank You..😊
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top