Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / February 2007

Tip: Looking for answers? Try searching our database.

Pulling Year from a text string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rod Cooley - 20 Feb 2007 18:20 GMT
I'm trying to pull a 2 digit year from a text sting.  This is how it looks.
I'm trying to extract the 2 digits from the left for the year, then the next
2 digits for the month.  Is there a way of doing this?

     960158963415
     011158694632
     001056956225
     040138693254

Thanks
--
JE McGimpsey - 20 Feb 2007 18:26 GMT
One way:

A1:     960158963415
B1:     =LEFT(A1,2)             <--- Year
C1:     =MID(A1,3,2)            <--- Month

If you want the results to be numbers rather than text:

B1:     =--LEFT(A1,2)
C1:     =--MID(A1,3,2)

> I'm trying to pull a 2 digit year from a text sting.  This is how it looks.
> I'm trying to extract the 2 digits from the left for the year, then the next
[quoted text clipped - 6 lines]
>
> Thanks
Elkar - 20 Feb 2007 18:33 GMT
For the year:

=LEFT(A1,2)

For the month:

=MID(A1,3,2)

HTH,
Elkar

> I'm trying to pull a 2 digit year from a text sting.  This is how it looks.
> I'm trying to extract the 2 digits from the left for the year, then the next
[quoted text clipped - 6 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.