ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to parse a string with a date? (https://www.excelbanter.com/excel-worksheet-functions/93620-how-parse-string-date.html)

[email protected]

How to parse a string with a date?
 
Hi,

Thanks for the help in advance.

I have several cells with the date located at the end. However there
are spaces at the end of the string of variable unknown length usually
anywhere from 5-15 spaces. For example the string in quotes are

"I need your help 12 JUN 2006 "
"Thanks for your help 12 JUN 2006 "

Someone earlier suggested using

=Datevalue((Right((Cell#),11)))

However this only works if the spaces were not there.

Thank you.


Toppers

How to parse a string with a date?
 

=DATEVALUE(RIGHT(TRIM(A1),11))

" wrote:

Hi,

Thanks for the help in advance.

I have several cells with the date located at the end. However there
are spaces at the end of the string of variable unknown length usually
anywhere from 5-15 spaces. For example the string in quotes are

"I need your help 12 JUN 2006 "
"Thanks for your help 12 JUN 2006 "

Someone earlier suggested using

=Datevalue((Right((Cell#),11)))

However this only works if the spaces were not there.

Thank you.




All times are GMT +1. The time now is 04:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com