#value!

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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
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...
[Table="width:, class:grid"][tr][td] [/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][/tr]
[tr][td]
2​
[/td][td]Apples 1 March 1918 2 left[/td][td]1[/td][td]March[/td][td]1918[/td][td]
Friday, March 01, 1918​
[/td][/tr]

[tr][td]
3​
[/td][td]blah 1 jan 2017[/td][td]1[/td][td]jan[/td][td]2017[/td][td]
Sunday, January 01, 2017​
[/td][/tr]

[tr][td]
4​
[/td][td]blah 5 June 2000[/td][td]5[/td][td]June[/td][td]2000[/td][td]
Monday, June 05, 2000​
[/td][/tr]
[/table]

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,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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