PC Review


Reply
Thread Tools Rate Thread

Date format Problem Macro

 
 
joecrabtree
Guest
Posts: n/a
 
      18th Dec 2006
To all,

I have date and time data in two seperate columns in a worksheet called
' ImportedRawData '. In column A is the date and in Column B is the
time:

17/10/2006 23:10:12


I want to be able to sum the two columns and have put the answer in
Column A of sheet 'ImportedDataEdit'. I can do this if I have two
numbers, but I seem to get a type mismatch error as soon as I start
using dates. I want the final format to be displayed as a custom number
format of

dd.mm.yyyy.hr.min.secs

Any help would be appreciated.

Regards

Joseph Crabtree

 
Reply With Quote
 
 
 
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      18th Dec 2006
Hi
Works for me if I put the date and time in two columns (A1 and B1 say)
and the formula
=A1+B1
in column C.
Check that the date is formatted as a date and the time as a time. You
might also need to edit the custom format you get in column C (my Excel
dropped the seconds). Just go into Format, Cells...and edit the custom
format as required.
regards
Paul
joecrabtree wrote:

> To all,
>
> I have date and time data in two seperate columns in a worksheet called
> ' ImportedRawData '. In column A is the date and in Column B is the
> time:
>
> 17/10/2006 23:10:12
>
>
> I want to be able to sum the two columns and have put the answer in
> Column A of sheet 'ImportedDataEdit'. I can do this if I have two
> numbers, but I seem to get a type mismatch error as soon as I start
> using dates. I want the final format to be displayed as a custom number
> format of
>
> dd.mm.yyyy.hr.min.secs
>
> Any help would be appreciated.
>
> Regards
>
> Joseph Crabtree


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
date format problem using Macro mohavv Microsoft Excel Misc 1 15th Oct 2008 01:09 AM
Date Format Macro Problem joecrabtree Microsoft Excel Programming 4 20th Dec 2006 02:58 PM
Format Date in macro =?Utf-8?B?RGFu?= Microsoft Access Macros 2 1st Nov 2005 04:41 PM
Macro to format date sw Microsoft Excel Programming 4 15th Oct 2003 01:23 PM
VBA/Macro/Date format help Jock Microsoft Excel Misc 5 3rd Aug 2003 01:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 PM.