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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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,216,109
Messages
6,128,875
Members
449,476
Latest member
pranjal9

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