Finding First 3 characters after a comma, hyphen..

questforexcel

Board Regular
Joined
Jan 18, 2019
Messages
95
Hi All,

Looking for some help on how to extract the first 3 characters from an alpha numeric data in a cell.

For eg.
"1234 - MUM Records Inc"
"4567 - SYD Books Inc"

I need a formula to extract the first 3 characters after the "-" above, so in the first case it should be "MUM" and in second "SYD"

May be there is a very simple formula but not able to get it.

Also there are spaces between numbers at the start, the "-" and the words after "-"
I tried using TRIM function but that did not remove the spaces, is there another these could be removed.

Would appreciate all your help.

Thank you,
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,638
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=MID(A2,FIND("-",A2)+2,3)
 
Solution

Marcílio_Lobão

Well-known Member
Joined
Oct 7, 2013
Messages
785
Office Version
  1. 2007
Platform
  1. Windows
questforexcel, Good morning.

Your data at A1.

Try to use: B1 -->
Excel Formula:
=MID(A1;FIND("- ";A1)+2;3)

Please, tell us if it worked for you.

I hope it helps.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,638
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

questforexcel

Board Regular
Joined
Jan 18, 2019
Messages
95
questforexcel, Good morning.

Your data at A1.

Try to use: B1 -->
Excel Formula:
=MID(A1;FIND("- ";A1)+2;3)

Please, tell us if it worked for you.

I hope it helps.
Thank you for your message and trying to help. It worked with the formula given on the first reply :) Thank you
 

Forum statistics

Threads
1,141,818
Messages
5,708,763
Members
421,588
Latest member
Wawie

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
Top