LeggoMyEggo
New Member
- Joined
- Feb 15, 2011
- Messages
- 25
Hello,
I am having a date/time problem.
I have one column of data that is formatted like a date (example: 3/16/2001 1:19:58 PM), and one that is a count of hours in a decimal form ("1.53" hours).
I am doing two seperated operations in my spreadsheet:
1. Finding the difference between the system time and my date-formatted column
2. I need to add the hours from my decimal-formatted column to that result.
(These are seperate because I have an if statement for the second operation, so it is not always applied after the first.)
Here is an example of what I have been trying so far (it gives me error 13, a type mismatch):
Thanks,
Alex
I am having a date/time problem.
I have one column of data that is formatted like a date (example: 3/16/2001 1:19:58 PM), and one that is a count of hours in a decimal form ("1.53" hours).
I am doing two seperated operations in my spreadsheet:
1. Finding the difference between the system time and my date-formatted column
2. I need to add the hours from my decimal-formatted column to that result.
(These are seperate because I have an if statement for the second operation, so it is not always applied after the first.)
Here is an example of what I have been trying so far (it gives me error 13, a type mismatch):
Code:
'I have a loop structure that increments counter from 1 to the final row
Dim CellasDate As Date
CellasDate = Cells(counter, 3) ' This cell contains "3/16/2011 1:19:58 PM"
MsgBox Format(time, "m/d/yyyy h:mm") - CellasDate
Thanks,
Alex