#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Dates from Text

Hi,

I have a spreadsheet of Public Holidays for different countries. The dates
are in thye following format
1st January (for New Years Day)
with no YEAR. This format is used as the list can be viewed by people using
both UK date format (dd/MM/yyyy) and US format (MM/dd/yyyy), and will be used
for couple of years.
I would like to add the year to it using (Year(NOW()) to get this date 1st
January 2008, and get the day of the week, in this case Tuesday. I know about
DATEVALUE. The problem I have is getting from 1st January to 01/01/2008.

I tried CONCATENATE("DATECELL", " ", Year(NOW())). This returns 1st January
2008, but DATEVALUE on this date returns #VALUE.

Any help would be much appreciated.

Thanks and Regards

Claudio
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Dates from Text

The problem is the "st". If you use:

1 January
in place of:
1st January

then:

=DATEVALUE(A1 & "-" & YEAR(NOW())) works just fine.
--
Gary''s Student - gsnu200812


"cloudyMalta" wrote:

Hi,

I have a spreadsheet of Public Holidays for different countries. The dates
are in thye following format
1st January (for New Years Day)
with no YEAR. This format is used as the list can be viewed by people using
both UK date format (dd/MM/yyyy) and US format (MM/dd/yyyy), and will be used
for couple of years.
I would like to add the year to it using (Year(NOW()) to get this date 1st
January 2008, and get the day of the week, in this case Tuesday. I know about
DATEVALUE. The problem I have is getting from 1st January to 01/01/2008.

I tried CONCATENATE("DATECELL", " ", Year(NOW())). This returns 1st January
2008, but DATEVALUE on this date returns #VALUE.

Any help would be much appreciated.

Thanks and Regards

Claudio

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Dates from Text

=--(REPLACE(A1,FIND(" ",A1)-2,2,"")&"-"&YEAR(TODAY()))



"cloudyMalta" wrote:

Hi,

I have a spreadsheet of Public Holidays for different countries. The dates
are in thye following format
1st January (for New Years Day)
with no YEAR. This format is used as the list can be viewed by people using
both UK date format (dd/MM/yyyy) and US format (MM/dd/yyyy), and will be used
for couple of years.
I would like to add the year to it using (Year(NOW()) to get this date 1st
January 2008, and get the day of the week, in this case Tuesday. I know about
DATEVALUE. The problem I have is getting from 1st January to 01/01/2008.

I tried CONCATENATE("DATECELL", " ", Year(NOW())). This returns 1st January
2008, but DATEVALUE on this date returns #VALUE.

Any help would be much appreciated.

Thanks and Regards

Claudio

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Dates from Text

Thank you very much for your help

"Gary''s Student" wrote:

The problem is the "st". If you use:

1 January
in place of:
1st January

then:

=DATEVALUE(A1 & "-" & YEAR(NOW())) works just fine.
--
Gary''s Student - gsnu200812


"cloudyMalta" wrote:

Hi,

I have a spreadsheet of Public Holidays for different countries. The dates
are in thye following format
1st January (for New Years Day)
with no YEAR. This format is used as the list can be viewed by people using
both UK date format (dd/MM/yyyy) and US format (MM/dd/yyyy), and will be used
for couple of years.
I would like to add the year to it using (Year(NOW()) to get this date 1st
January 2008, and get the day of the week, in this case Tuesday. I know about
DATEVALUE. The problem I have is getting from 1st January to 01/01/2008.

I tried CONCATENATE("DATECELL", " ", Year(NOW())). This returns 1st January
2008, but DATEVALUE on this date returns #VALUE.

Any help would be much appreciated.

Thanks and Regards

Claudio

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dates from Text

=--REPLACE(A1,FIND(" ",A1)-2,2,"")

--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
=--(REPLACE(A1,FIND(" ",A1)-2,2,"")&"-"&YEAR(TODAY()))



"cloudyMalta" wrote:

Hi,

I have a spreadsheet of Public Holidays for different countries. The
dates
are in thye following format
1st January (for New Years Day)
with no YEAR. This format is used as the list can be viewed by people
using
both UK date format (dd/MM/yyyy) and US format (MM/dd/yyyy), and will be
used
for couple of years.
I would like to add the year to it using (Year(NOW()) to get this date
1st
January 2008, and get the day of the week, in this case Tuesday. I know
about
DATEVALUE. The problem I have is getting from 1st January to 01/01/2008.

I tried CONCATENATE("DATECELL", " ", Year(NOW())). This returns 1st
January
2008, but DATEVALUE on this date returns #VALUE.

Any help would be much appreciated.

Thanks and Regards

Claudio



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
How do I convert dates stored as dates to text? diamunds Excel Discussion (Misc queries) 5 September 7th 07 05:38 PM
Format text 'dates' to real dates Jacy Excel Worksheet Functions 4 July 24th 06 02:10 AM
dates and text karene Excel Discussion (Misc queries) 1 November 18th 05 04:21 PM
dates and text Sloth Excel Discussion (Misc queries) 0 November 18th 05 04:16 PM
Text with Dates littlegreenmen1 Excel Discussion (Misc queries) 3 June 15th 05 05:13 PM


All times are GMT +1. The time now is 11:37 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"