Need to add countries in formula

Status
Not open for further replies.

ctanxcel

New Member
Joined
Jul 14, 2024
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Want to add countries in below substitute Formula formula with full names.
South America Sri Lanka South Africa New Zealand

South Africa sould be South Africa and same for others.

=LET(a,TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"United States","US"),"United Kingdom","UK"),"United Arab Emirates","UAE")," "),TEXTJOIN({": ","; "},TRUE,IFERROR(INDEX(a,{2,1,4,3,6,5,8,7,10,9}),"")))

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
That makes no sense. Why would you substitute something with itself? That doesn't achieve anything.
 
Upvote 0
I think you missed my point. Using:
=SUBSTITUTE(A1,"South Africa","South Africa")
achieves nothing more than just using:
=A1
 
Upvote 1
It has to do with my original solution, but the needs changed slightly. He's posting multiple posts for the same question.

ctanxcel You need to continue on in your original thread, not make new posts for the same question.​

 
Upvote 1
It has to do with my original solution, but the needs changed slightly. He's posting multiple posts for the same question.

ctanxcel You need to continue on in your original thread, not make new posts for the same question.​

Yes I already posted but there are no solutions that's why I am looking for solutions via another post. Have a nice day 😊
 
Upvote 0
I think you missed my point. Using:
=SUBSTITUTE(A1,"South Africa","South Africa")
achieves nothing more than just using:
=A1
Example I cell A1: 123 South America 456 Sri Lanka 711 South Africa 167 New Zealand
into below formate in cell b1
South America: 123; Sri Lanka: 456; South Africa: 711; New Zealand: 167

This is just for your information what actually I am doing.. 😊
 
Upvote 0
Yes I already posted but there are no solutions that's why I am looking for solutions via another post. Have a nice day 😊
Yes, but you're not supposed to. You just reply to your original post and it bumps it back up to the top. I saw a different post of this and thought you had an answer. It's very confusing for people to try and help you when there are multiple posts for the same thing. I'm very close. I might need help on one thing.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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