How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
Hello, my B2 is returning the value error if I look at Logical1 in the Formula Bar and press F9 I see #VALUE !,#VALUE !,10. If there anyway I can get B2 to return the 10 please?

Excel Workbook
ABC
2Apples 1 March 1918 2 left#VALUE !10
Sheet1
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
In case I am on the wrong tracks here, another question would be, how can I extract the "1 March 1918" from A1 please...
 
Upvote 0
Based on your single sample, this works...
=FIND("@",SUBSTITUTE(B2," ","@",2))+1
 
Upvote 0
Hello Ford, I have various sources of data and some of the cells will have dates somewhere in the cell but there isn't a set pattern. I can deal with and extract 01/03/1914, 01.03.1914 and 01-Mar-1914 but what I can't extract is 01 March 1914 or 1 March 1914. My thoughts were, if I find "March" then three characters before "March" with TRIM will give the date or a random character and the date and from the end of "March" 5 characters with TRIM will give the year. Once I have the date it's not going to change so I haven't ruled out 12 helper columns, 1 for each month as I can delete it all once the dates are found. I have 9900 rows of data so too many to look through with the Mark I eyeball to find these dates...!
 
Upvote 0
OK here is a way with 3 helpers and an answer column...
A​
B​
C​
D​
E​
2​
Apples 1 March 1918 2 left1March1918
Friday, March 01, 1918​
3​
blah 1 jan 20171jan2017
Sunday, January 01, 2017​
4​
blah 5 June 20005June2000
Monday, June 05, 2000​
B2=TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",LEN($A2))),LEN($A2)*(COLUMN()-1)+1,LEN($A2)))
copied across 2 more times
E2=DATEVALUE(B2&C2&D2)
formatted as needed - I used Long date
 
Upvote 0
Am I right is saying that solution assumes the day in my data is always after the first word? If so, that isn't always the case... I know LOL, I curse at this project on a daily basis! I'll get it sorted with a million and one helper columns but, I'm most grateful for your assistance tonight Ford and on a positive note, there will be data where your formula will work as the day will be after the first word!!! It's just a matter of using IFERROR and multiple formulas to get the date which will then be eventually hard coded anyway. Thanks again Ford.
 
Upvote 0
This is an ugly array formula, but maybe does what you want?

Enter with CTRL-SHIFT-ENTER.
Excel Workbook
AB
1
2Apples 1 March 1918 2 left1 March 1918
3Number of words before date 1 February 1918 2 left1 February 1918
4Test sample 2 January 1918 and some words at the end2 January 1918
52 January 19182 January 1918
Sheet
 
Upvote 0
Thanks Ahoy, that solution is working and is going to help me find some dates but it only seems to be working with single digit dates.
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,669
Members
449,463
Latest member
Jojomen56

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