Very tricky question

mark_ink

New Member
Joined
Jan 12, 2016
Messages
2
Here I'd like to find the way to get starting 3 letters of every country.
paste these values into Column A

ie.
AUS for Australia
IND for India

Many thanks


001-01-Australia-02-06
12-2-Japan-65
236-01-India-45-01
1401-3-Singapore-458-1
456-01-France-456-2
12-9-China-45-69

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Well, that was easy, 2-3 mins though I've done something like this before

=UPPER(LEFT(TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",500)),1000,500)),3))
 
Last edited:
Upvote 0
Here's another possible option:


Excel 2013
AB
1AUS001-01-Australia-02-06
2***12-2-Japan-65
3IND236-01-India-45-01
4SIN1401-3-Singapore-458-1
5FRA456-01-France-456-2
6CHI12-9-China-45-69
Sheet1
Cell Formulas
RangeFormula
A1=UPPER(MID(B1,FIND("-",SUBSTITUTE(B1,"-","#",1))+1,3))
 
Upvote 0
Welcome to Mr Excel

Maybe...


A
B
1
001-01-Australia-02-06​
AUS​
2
12-2-Japan-65​
***​
3
236-01-India-45-01​
IND​
4
1401-3-Singapore-458-1​
SIN​
5
456-01-France-456-2​
FRA​
6
12-9-China-45-69​
CHI​

<tbody>
</tbody>


Formula in B1 copied down
=UPPER(MID(A1,SEARCH("|",SUBSTITUTE(A1,"-","|",2))+1,3))

Hope this helps

M.
 
Last edited:
Upvote 0
Thanks :)
Welcome to Mr Excel

Maybe...


A
B
1
001-01-Australia-02-06​
AUS​
2
12-2-Japan-65​
***​
3
236-01-India-45-01​
IND​
4
1401-3-Singapore-458-1​
SIN​
5
456-01-France-456-2​
FRA​
6
12-9-China-45-69​
CHI​

<tbody>
</tbody>


Formula in B1 copied down
=UPPER(MID(A1,SEARCH("|",SUBSTITUTE(A1,"-","|",2))+1,3))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,215,532
Messages
6,125,358
Members
449,221
Latest member
chriscavsib

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