Function to separate text to a date required

Hydro Man

New Member
Joined
Jun 29, 2009
Messages
48
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I have a great number of cells with text including a date plus text after the date.<o:p></o:p>
The text length before and after the date is different for each cell.<o:p></o:p>
How would I separate the text BEFORE the date into another cell?<o:p></o:p>
Say the string below is in cell A1 and the result would be in cell B1.<o:p></o:p>
<o:p> </o:p>
Cell A1 = Notification Has Been Retained 4/14/2005 3 doc <o:p></o:p>
Cell B1 = Notification Has Been Retained <o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Thank you for your help.<o:p></o:p>
<o:p> </o:p>
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try;

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";">Notification Has Been Retained 4/14/2005 3 doc </td><td style=";">Notification Has Been Retained</td><td style="text-align: right;;">4/14/2005</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B1</th><td style="text-align:left">=TRIM(<font color="Blue">REPLACE(<font color="Red">A1,MIN(<font color="Green">FIND(<font color="Purple">{1,2,3,4,5,6,7,8,9,0},A1&"1234567890"</font>)</font>),LEN(<font color="Green">A1</font>),""</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C1</th><td style="text-align:left">=LOOKUP(<font color="Blue">1E+307,--LEFT(<font color="Red">TRIM(<font color="Green">SUBSTITUTE(<font color="Purple">A1,B1,""</font>)</font>),{1,2,3,4,5,6,7,8,9,10}</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 
Upvote 0
Haseeb,

Sorry for the long time in my reply, my day ended just after I sent the post. Thank you very much for your help, the formula is exactly what I need. I would not have figured it out on my own.

Regards,

Hydro Man
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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