How to extract values between different caracteres ?

Inacio11

New Member
Joined
Jul 3, 2018
Messages
33
Hi.
At link below I have attached a excel file where I am trying to extract the data number (day-month-year) from 3 different texts and with different lenghts, but with no sucess till now. I have included more details on excel file.
I need the formula (not VBA) !
https://www.sendspace.com/file/c6s2ji
Thanks in advance !
Inacio
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I'm sure there will be plenty of help available.....but....most posters will NOT download a file to look at your problem.
I'd suggest either describing your problem more clearly, or pasting some sample data directly to the forum
 
Upvote 0
I'm sure there will be plenty of help available.....but....most posters will NOT download a file to look at your problem.
I'd suggest either describing your problem more clearly, or pasting some sample data directly to the forum

Hello Michael,
I thought that could be easier to clarify, but I understanding you. I will try:

A B | C | D
A1: SMS from: 88888 2018-07-02 10:59:27 >>>>> 2 | 7 |2018
A2: From 27300 July 02, 2018 at 0721PM>>>>>>>2 | 7 |2018
A3: From 11108 July 02, 2018 at 1017PM>>>>>>>2 | 7 |2018

As you can see above the text in each row is slightly different from each other, so I'd like to extract just the numbers related to the dates highlighted on red colour to columns in separate

Columns
A = full text
B= day
C= month
D= year
Regards,
 
Upvote 0
Column AColumn BColumn CColumn DColumn E
daymonthyear
SMS from: 88888 2018-07-02 10:59:27272018
From 27300 July 02, 2018 at 0721PM272018
From 11108 July 02, 2018 at 1017PM272018

<tbody>
</tbody>
Now it is better for understanding !!
 
Upvote 0
Hi,

This will accommodate either 5 or 6 digit Text addresses.

3 slightly different formulas for day, month, year, formulas copied down:


Book1
CDEFG
4daymonthyear
5SMS from: 88888 2018-07-02 10:59:27272018
6From 27300 July 02, 2018 at 0721PM272018
7From 11108 July 02, 2018 at 1017PM272018
8SMS from: 888889 2017-08-25 10:59:272582017
9From 273009 July 04, 2018 at 0721PM472018
10From 111089 January 31, 2015 at 1017PM3112015
Sheet119
Cell Formulas
RangeFormula
E5=DAY(LEFT(SUBSTITUTE(TRIM(MID($C5,MIN(FIND({0,1,2,3,4,5,6,7,8,9},$C5&"0123456789"))+6,255))," ",REPT(" ",50),IF(ISNUMBER(FIND(",",$C5)),3,1)),50)+0)
F5=MONTH(LEFT(SUBSTITUTE(TRIM(MID($C5,MIN(FIND({0,1,2,3,4,5,6,7,8,9},$C5&"0123456789"))+6,255))," ",REPT(" ",50),IF(ISNUMBER(FIND(",",$C5)),3,1)),50)+0)
G5=YEAR(LEFT(SUBSTITUTE(TRIM(MID($C5,MIN(FIND({0,1,2,3,4,5,6,7,8,9},$C5&"0123456789"))+6,255))," ",REPT(" ",50),IF(ISNUMBER(FIND(",",$C5)),3,1)),50)+0)
 
Last edited:
Upvote 0
Hi jtakw
First thanks for your early repply !
I did not understand yet, but the formulas works to text:
SMS from: 88888 2018-07-02 10:59:27

<tbody>
</tbody>
...but not for:
From 27300 July 02, 2018 at 0721PM
From 11108 July 02, 2018 at 1017PM

the result is #VALUE !

Inacio
 
Upvote 0
Have no idea what you mean, apparently it works for me as in my sample in Post #5 .

I've even just now tested on you Actual uploaded file at Sendspace, works fine.

You DO realize that there are 3 (three) Different formulas?

Using Post #5 for sample:

E5 formula for DAY, copied down.
F5 formula for MONTH, copied down.
G5 formula for YEAR, copied down.
 
Upvote 0
I've had a look at your new file and have No Idea why you have the #VALUE error in I6:K7...

If you select any of the Cells, say I6, click in the Formula Bar, hit Enter, the correct result Pops up.
Or, if you select I5, copy the formula and select I6:I7 and paste Formula, the correct results Pop up...

Don't know what you did there.

EDIT: Can you check and make sure you have Excel Calculations set to "Automatic"???
 
Last edited:
Upvote 0
Hi jtakw
First thanks for your early repply !
I did not understand yet, but the formulas works to text:
SMS from: 88888 2018-07-02 10:59:27

<tbody>
</tbody>
...but not for:
From 27300 July 02, 2018 at 0721PM
From 11108 July 02, 2018 at 1017PM

the result is #VALUE !

Inacio


Hi,

It depends on the regional settings of the excel you are working on.

Try to change
From 27300 July 02, 2018 at 0721PM with
From 27300 02 July, 2018 at 0721PM and July with the name of the month in your country.

and the formulas will work.
 
Upvote 0

Forum statistics

Threads
1,215,676
Messages
6,126,161
Members
449,295
Latest member
DSBerry

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