Changing Text to a Date

michael_allen_24

Board Regular
Joined
Dec 29, 2010
Messages
64
Hey everyone! Have a quick question for you: I have this text in a cell:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
<TABLE style="WIDTH: 128pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=171><TBODY><TR style="HEIGHT: 15pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 0in; WIDTH: 128pt; PADDING-RIGHT: 0in; HEIGHT: 15pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" width=171>Jul11<o:p></o:p>
</TD></TR></TBODY></TABLE>
<o:p></o:p>
I want it to display 7/11/2011.<o:p></o:p>
<o:p></o:p>
Formatting the cell to display the date does not work, probably because it is text? Not sure.<o:p></o:p>
<o:p></o:p>
What is the easiest formula to automatically do this for me? <o:p></o:p>
<o:p> </o:p>
Thanks in advance.<o:p></o:p>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Excel Workbook
ABC
1Jul1140735<< Now Format as Date
2
Sheet1
Excel 2007
Cell Formulas
RangeFormula
B1=DATEVALUE(A1)
 
Upvote 0
So... in the UK, Jul11 is being viewed as 'July 2011' and here in the states it's seen as July 11th (of the current year.)

Hmmm... good to know.
 
Upvote 0
One more quick question:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
This is my original text in cell A1: <o:p></o:p>
<o:p></o:p>
2/Jul11<o:p></o:p>
<o:p></o:p>
I am using these formulas to pull apart the text:<o:p></o:p>
<o:p></o:p>
Cell B1 =FIND("/",A2)<o:p></o:p>
Cell C1 =LEFT(A2,B2-1)<o:p></o:p>
<o:p></o:p>
The result is as it should be:<o:p></o:p>
Cell C1 = 2<o:p></o:p>
<o:p></o:p>
But the format that comes back does not recognize it as 2. I tried the Trim function but that did not help. Any ideas?<o:p></o:p>
 
Upvote 0
=LEFT(A2,B2-1)*1<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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