Formula to extract numbers between two characters?

MariaR323

New Member
Joined
Sep 13, 2017
Messages
12
I have the following data for HS & College and I'd like to extract only the HS Year as shown below:

HS & CollegeHS Year (Result I want)
HS Year: 2001/Univ Year: 20062001
HS Year:1997/Univ Year:20051997

<tbody>
</tbody>

Is there a formula to achieve this? Noting that the original entries in the column HS & College can have a space or not after the first colon.

Any help would be appreciated as I'm brain fried at the moment.

Thanks!
Maria
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If the wording is always the same...

=0+LEFT(TRIM(SUBSTITUTE(A1,"HS Year:","")),4)
 
Upvote 0
If the wording is always the same...

=0+LEFT(TRIM(SUBSTITUTE(A1,"HS Year:","")),4)


Unfortunately, I just realized there's a lot of older records that the entry format was not the same and looks like the wording will not always be the same and some entries were made abbreviating Year to Yr.

Any way to rework the formula to account for this?
 
Upvote 0
Unfortunately, I just realized there's a lot of older records that the entry format was not the same and looks like the wording will not always be the same and some entries were made abbreviating Year to Yr.

Any way to rework the formula to account for this?
Give this a try...

=0+RIGHT(LEFT(A1,FIND("/",A1)-1),4)
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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