Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pyc pyc is offline
external usenet poster
 
Posts: 1
Default code works in excel 2002, but not in excel 2003

Cells(j, 1) = DateValue(Cells(j, 1)) + TimeValue(Cells(j, 1))

this is the line, and the error message is "type mismatch" ... sam
code works in excel 2002, but not in 2003.

The date is in format: 01-Dec-02 10:18:59 AM


please help.... it must be a classic problem..

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default code works in excel 2002, but not in excel 2003

Works for me in both XL03 and XL04.

Are you sure the cell contains what you posted?


In article ,
pyc wrote:

Cells(j, 1) = DateValue(Cells(j, 1)) + TimeValue(Cells(j, 1))

this is the line, and the error message is "type mismatch" ... same
code works in excel 2002, but not in 2003.

The date is in format: 01-Dec-02 10:18:59 AM


please help.... it must be a classic problem...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default code works in excel 2002, but not in excel 2003

I get a type mismatch error in Excel 2003 and 2002 only if the cell entry
cannot be interpreted as a date/time. It may be that your Windows regional
setting for date format is different than the format in the cell. Why it
would work in one version of Excel and not another is a mystery to me.

--
Jim Rech
Excel MVP
"pyc " wrote in message
...
| Cells(j, 1) = DateValue(Cells(j, 1)) + TimeValue(Cells(j, 1))
|
| this is the line, and the error message is "type mismatch" ... same
| code works in excel 2002, but not in 2003.
|
| The date is in format: 01-Dec-02 10:18:59 AM
|
|
| please help.... it must be a classic problem...
|
|
| ---
| Message posted from http://www.ExcelForum.com/
|


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
function =IFERROR LOOKUP works in excel 2007 not in excel 2003 David Ryan Excel Worksheet Functions 4 April 15th 09 03:25 PM
Converting Excel 2002 to MS Works T. Jenkins Excel Discussion (Misc queries) 4 November 8th 08 10:43 PM
Excel 2002: How to make the formula works ? Mr. Low Excel Discussion (Misc queries) 8 June 18th 07 01:57 PM
convert works 4.5 spreadsheet to Excel 2002 (Office xp) pflash Excel Discussion (Misc queries) 0 October 12th 05 05:41 PM
VBA Code Works in 97, Not in 2002 William[_2_] Excel Programming 11 August 12th 03 02:05 AM


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