#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Extract Text

I have a spreadsheet with a daily import tab. In this daily import, there is
a cell with the date as "April 4, 2006 As of 2:00 PM ET". I am trying to
extract the date of the imported worksheet for display on another page.
Because of the dynamics of this spreadsheet, Text To Columns will not work
for me.

Is there an easy way to extract the information since the lengths of the
month and date may vary? I got the year by

=--MID(L1,FIND(", ",L1)+2,4)

But I'm not sure how to obtain the other information. Please help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Extract Text

Once you find the year, you can use left to pick up the rest of the
date:
=LEFT(L1,FIND("As",L1)-2)


On May 5, 11:49 am, Peanut wrote:
I have a spreadsheet with a daily import tab. In this daily import, there is
a cell with the date as "April 4, 2006 As of 2:00 PM ET". I am trying to
extract the date of the imported worksheet for display on another page.
Because of the dynamics of this spreadsheet, Text To Columns will not work
for me.

Is there an easy way to extract the information since the lengths of the
month and date may vary? I got the year by

=--MID(L1,FIND(", ",L1)+2,4)

But I'm not sure how to obtain the other information. Please help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Extract Text

That is a lot simpler than what I was trying to make it. Thank you!

"Reitanos" wrote:

Once you find the year, you can use left to pick up the rest of the
date:
=LEFT(L1,FIND("As",L1)-2)


On May 5, 11:49 am, Peanut wrote:
I have a spreadsheet with a daily import tab. In this daily import, there is
a cell with the date as "April 4, 2006 As of 2:00 PM ET". I am trying to
extract the date of the imported worksheet for display on another page.
Because of the dynamics of this spreadsheet, Text To Columns will not work
for me.

Is there an easy way to extract the information since the lengths of the
month and date may vary? I got the year by

=--MID(L1,FIND(", ",L1)+2,4)

But I'm not sure how to obtain the other information. Please help.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Extract Text

On Mon, 5 May 2008 08:49:03 -0700, Peanut
wrote:

I have a spreadsheet with a daily import tab. In this daily import, there is
a cell with the date as "April 4, 2006 As of 2:00 PM ET". I am trying to
extract the date of the imported worksheet for display on another page.
Because of the dynamics of this spreadsheet, Text To Columns will not work
for me.

Is there an easy way to extract the information since the lengths of the
month and date may vary? I got the year by

=--MID(L1,FIND(", ",L1)+2,4)

But I'm not sure how to obtain the other information. Please help.


Given your format, the date will always end at the third space.

=LEFT(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),3))-1)

returns the date in text form.

Since the date is an unambiguous textual representation, you could convert it
into an Excel date by preceding it with the double unary, and formatting it as
a date.

e.g.

=--LEFT(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),3))-1)
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to extract certain text from text string Trista @ Pacific Excel Worksheet Functions 4 November 21st 07 07:07 PM
Extract text from large Text ldiaz Excel Discussion (Misc queries) 4 November 14th 07 01:21 AM
Text Extract Arturo Excel Worksheet Functions 1 December 12th 05 04:24 PM
EXTRACT TEXT FROM TEXT STRING carricka Excel Worksheet Functions 4 July 8th 05 11:00 AM
Extract text someone Excel Worksheet Functions 12 January 23rd 05 12:24 AM


All times are GMT +1. The time now is 08:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"