Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Removing text from a date

Hi
I have a date field in a spreadsheet that is coming from another system as a
text fled and contains charatcetrs I wish to remove. And I want the output to
just be dd/mm/yy. Problem is I can't just count overall characters and remove
left and righ becuase sometimes there is an asterisk and sometimes the date
has 2 characters for the number ie 10 Jun as opposed to 5 Jun. Example
below....

Thu, 5 Jul 07*

Anyone got any cunning plans around a formulae to clean this up and output
just a date?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Removing text from a date

On Thu, 2 Aug 2007 17:20:00 -0700, ScottG
wrote:

Hi
I have a date field in a spreadsheet that is coming from another system as a
text fled and contains charatcetrs I wish to remove. And I want the output to
just be dd/mm/yy. Problem is I can't just count overall characters and remove
left and righ becuase sometimes there is an asterisk and sometimes the date
has 2 characters for the number ie 10 Jun as opposed to 5 Jun. Example
below....

Thu, 5 Jul 07*

Anyone got any cunning plans around a formulae to clean this up and output
just a date?



If the format is similar to the above, in that it always starts with several
letters followed by a comma, and optionally end with an asterisk, then perhaps
this will work:

=--TRIM(MID(A1,FIND(",",A1)+1,FIND("*",A1&"*")-FIND(",",A1)-1))

Format the result as one of Excel's date formats, or else you will only see a
five digit serial number.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Removing text from a date

Hi

One way
=--(MID(SUBSTITUTE(A1,"*",""),FIND(",",SUBSTITUTE(A1, "*",""))+2,LEN(A1)-1))

--
Regards
Roger Govier



"ScottG" wrote in message
...
Hi
I have a date field in a spreadsheet that is coming from another system as
a
text fled and contains charatcetrs I wish to remove. And I want the output
to
just be dd/mm/yy. Problem is I can't just count overall characters and
remove
left and righ becuase sometimes there is an asterisk and sometimes the
date
has 2 characters for the number ie 10 Jun as opposed to 5 Jun. Example
below....

Thu, 5 Jul 07*

Anyone got any cunning plans around a formulae to clean this up and output
just a date?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Removing text from a date

Legend - it works

"Ron Rosenfeld" wrote:

On Thu, 2 Aug 2007 17:20:00 -0700, ScottG
wrote:

Hi
I have a date field in a spreadsheet that is coming from another system as a
text fled and contains charatcetrs I wish to remove. And I want the output to
just be dd/mm/yy. Problem is I can't just count overall characters and remove
left and righ becuase sometimes there is an asterisk and sometimes the date
has 2 characters for the number ie 10 Jun as opposed to 5 Jun. Example
below....

Thu, 5 Jul 07*

Anyone got any cunning plans around a formulae to clean this up and output
just a date?



If the format is similar to the above, in that it always starts with several
letters followed by a comma, and optionally end with an asterisk, then perhaps
this will work:

=--TRIM(MID(A1,FIND(",",A1)+1,FIND("*",A1&"*")-FIND(",",A1)-1))

Format the result as one of Excel's date formats, or else you will only see a
five digit serial number.
--ron

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Removing text from a date

=SUBSTITUTE(REPLACE(A1,1,FIND(",",A1)+1,""),"*","" )+0


"ScottG" wrote:

Hi
I have a date field in a spreadsheet that is coming from another system as a
text fled and contains charatcetrs I wish to remove. And I want the output to
just be dd/mm/yy. Problem is I can't just count overall characters and remove
left and righ becuase sometimes there is an asterisk and sometimes the date
has 2 characters for the number ie 10 Jun as opposed to 5 Jun. Example
below....

Thu, 5 Jul 07*

Anyone got any cunning plans around a formulae to clean this up and output
just a date?

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
Removing text Dave Excel Discussion (Misc queries) 13 July 23rd 08 09:02 PM
Removing Text Tubthumper Excel Worksheet Functions 3 October 19th 06 06:29 PM
removing date data from a cell [email protected] Excel Discussion (Misc queries) 2 May 16th 06 08:08 PM
removing year from date Joe Man Excel Worksheet Functions 1 September 11th 05 07:18 PM
Removing text characters Scott Excel Worksheet Functions 4 August 11th 05 12:19 PM


All times are GMT +1. The time now is 08:06 AM.

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"